What's wrong with this line of code?

AddCustomShipment(“Python”, “models/weapons/w_colt_python.mdl”, “m9k_coltpython”, 2500, 10, false, 0, false, category = “Pistols”, {TEAM_GUN})

giving me an error.

“giving me an error”

Okay, well, none of us are mind readers so pasting the error here might help.

Just from the code alone I can see that you’re trying to put a named argument into the function call which won’t work. Instead of


category = "Pistols"

it should be


"Pistols"

Alright il try that, By the way the error was

[ERROR] Lua is unable to understand file “darkrp_customthings/shipments.lua” because its author made a mistake around line number 20.
The best help I can give you is this:

Right before the ‘,’, Lua encountered something it could not make sense of.

Try this?

[lua]
AddCustomShipment(“Python”, {
model = “models/weapons/w_colt_python.mdl”,
entity = “m9k_coltpython”,
price = 2500,
amount = 10,
separate = false,
pricesep = 0,
noship = false,
allowed = {TEAM_GUN},
category = “Pistols”,
})
[/lua]