Hey!
As I know DarkRP relatively well, this new categories thing comes as something new for me to be adapted to.
So, I was wondering if anyone could be of assistance.
I understand most of it(Mostly because of Google), but I cannot figure out how to categorize custom items if you set your shipments in this format
[CODE]AddCustomShipment("G36C Shipment", "models/weapons/w_g36e.mdl", "fas2_g36c", 6000, 10, false, 0, false, {TEAM_GUN})[/CODE]
What is described, is adding:
[CODE]category = "Example",
sortOrder = 100,[/CODE]
Yet, it corrupts the shipments in every way I have tried adding it.
I of course have tried it without "category" and "sortOrder" and many other ways.
Any help would be appreciated.
Please add the error log provided by the client console or the server console, you can also use console.log located in the garrysmod folder if your server provides one. I'm assuming that you might be calling a non-existing category. Also the code looks like it may be setup wrong try the following code.
Try using:
[CODE]AddCustomShipment("G36C Shipment", { "models/weapons/w_g36e.mdl", "fas2_g36c", 6000, 10, false, 0, false, {TEAM_GUN}, category = "Other"})[/CODE]
Code that you gave put out same error:
[CODE][ERROR] A runtime error has occurred in "addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua" on line 20.
The best help I can give you is this:
Corrupt shipment: G36C Shipment!
The price must be an existing number or (for advanced users) the getPrice field must be a function.
Hints:
- No hints, sorry.
The responsibility for this error lies with (the authors of) one (or more) of these files:
1. addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua on line 20
2. [C] on line -1
3. gamemodes/darkrp/gamemode/libraries/simplerr.lua on line 412
4. gamemodes/darkrp/gamemode/libraries/fn.lua on line 80
5. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 131
6. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 142
7. gamemodes/darkrp/gamemode/init.lua on line 81
------- End of Simplerr error -------
gamemodes/darkrp/gamemode/libraries/simplerr.lua:467: [ERROR] A runtime error has occurred in "addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua" on line 20.
The best help I can give you is this:
Corrupt shipment: G36C Shipment!
The price must be an existing number or (for advanced users) the getPrice field must be a function.
Hints:
- No hints, sorry.
The responsibility for this error lies with (the authors of) one (or more) of these files:
1. addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua on line 20
2. [C] on line -1
3. gamemodes/darkrp/gamemode/libraries/simplerr.lua on line 412
4. gamemodes/darkrp/gamemode/libraries/fn.lua on line 80
5. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 131
6. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 142
7. gamemodes/darkrp/gamemode/init.lua on line 81
------- End of Simplerr error -------[/CODE]
hmm ok, try it this way.
[CODE]DarkRP.createShipment("G36C Shipment", {
model = "models/weapons/w_g36e.mdl",
entity = "fas2_g36c",
price = 6000,
amount = 10,
seperate = false,
pricesep = 600,
noship = false,
allowed = {TEAM_GUN},
category = "Other"
})[/CODE]
Make sure your using the current DarkRP version.
Yeah, see, I get how to do it that way, with the added sortOrder. Yet, that is what I'm trying to avoid.
I am sure I am using the correct version...
From what I am gathering from friends, experienced DarkRP Devs, etc.
There is no way to do this if you have your layout as mine.
You will need to use the expanded layout defining the [CODE]"category = "Other"[/CODE] line.
Thanks for suggestions.
Sorry, you need to Log In to post a reply to this thread.