[ERROR] Lua is unable to understand file "darkrp_customthings/shipments.lua" because its author made a mistake around line number 86.
The best help I can give you is this:
Right before the '=', Lua expected to read a ')', but it didn't.
Hints:
- Did you forget a keyword?
- Did you forget a comma?
------- End of Simplerr error -------
Line 86
DarkRP.createShipment("Acr", "models/weapons/w_masada_acr.mdl", "m9k_acr", 40000, 10, false, 0, false, category = "Automatic Rifles", {TEAM_GUN})
Help! idk what i did wrong, i don't know what to do to fix this lua error!
can someone help please!
You can’t just plug category = into that function. Get rid of it and it will work.
DarkRP.createShipment takes a string as its first parameter and a table as its second, which can be seen here. Rather than passing it a table, you're giving the function each element in the table as an argument, which likely won't work unless you've previously changed the behaviour of the function to work that way. Below is an example of how it should look.
DarkRP.createShipment("AK47", { -- Name of the shipment
model = "models/weapons/w_rif_ak47.mdl", -- The model that the shipment spawns (should be the world model...)
entity = "weapon_ak472", -- The class name of the weapon. Usually something of the form weapon_something.
price = 2450, -- The price of one shipment
amount = 10, -- How many guns there are in one shipment
separate = false, -- Whether the item in this shipment is also sold separately
pricesep = nil, -- OPTIONAL: The price of a single weapon when sold separately
noship = false, -- OPTIONAL: True/false, whether this weapon is sold in a shipment
allowed = {TEAM_GUN}, -- OPTIONAL: List of jobs who can buy the shipment
category = "Rifles", -- OPTIONAL: The category the shipment should be in, in the F4 menu
})
Sorry, you need to Log In to post a reply to this thread.