DarkRP Shipments / Categories Issue!

This is a very strange issue I’m having. Take note that another category I have set up, Snipers, DOES work, however this one does not… Okay, so… here is the code from my categories.



DarkRP.createCategory{
   name = "Handguns",
   categorises = "weapons",
   startExpanded = true,
   color = Color(135, 0, 129, 255),
   canSee = function(ply) return true end,
   sortOrder = 25,
}

and here is a shipment


DarkRP.createShipment("HK 45C", {
    model = "models/weapons/w_hk45c.mdl",
    entity = "m9k_hk45",
    price = 200,
    amount = 1,
    seperate = false,
    pricesep = 500,
    noship = false,
    allowed = {TEAM_GUN},
	category = "Handguns",
})  

The error I’m getting :



[ERROR] A runtime error has occurred in "your custom shipments" on line -1.
The best help I can give you is this:

The category of "HK 45C" ("Handguns") does not exist!

Hints:
	- Make sure the category is created with DarkRP.createCategory.
	- The category name is case sensitive!
	- Categories must be created before DarkRP finished loading.

The responsibility for the error above lies with (the authors of) one (or more) of these files:
your custom shipments
------- End of Simplerr error -------

Edit: After changing the sort order to go in sequence from 100 and so on, all the categories now work on single weapons, but everything is still an error and sorted into “other” in the shipments tab…

Could you add the lua for one of the working weapons?


DarkRP.createShipment("Ak47", {
    model = "models/weapons/w_ak47_m9k.mdl",
    entity = "m9k_ak47",
    price = 215,
    amount = 10,
    separate = true,
    pricesep = 215,
    noship = false,
    allowed = {TEAM_GUN},
    category = "Rifles",
})

One thing I noticed, is you’re trying to put shipments into a weapons Category. So I would suggest changing

to

DarkRP.createCategory{
name = “Handguns”,
categorises = “shipments”,
startExpanded = true,
color = Color(135, 0, 129, 255),
canSee = function(ply) return true end,
sortOrder = 25,
}

Okay, now it’s really bizarre. Everything is where it should be and all categories are properly displayed, but the errors are still there… Any ideas?

Try copying another one and editing it slightly, to change the gun ans category name maybe.

Issue appears to be fixed. Thanks for your help!