DarkRP problem.

I don’t see a problem with the code, but I’m getting a error and its also not showing up in the F4 tab.



[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:519: unexpected symbol near ','
  1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:0




Line 519: AddCustomShipment("FN FAL Single", "models/weapons/w_fn_fal.mdl", "m9k_fal",  3000, 10, false, 123, false, {TEAM_BLACKMARKET})

Sometimes the error can be on the line before or after. Could you post those too?


Line 516: AddCustomShipment("Acr Single", "models/weapons/w_masada_acr.mdl", "m9k_acr",  0, 1, true, 750, true,{TEAM_BLACKMARKET})
Line 517: AddCustomShipment("AMD 65", "models/weapons/w_amd_65.mdl", "m9k_amd65", 4000, 10, false, 123, false, {TEAM_GUN})
Line 518: AddCustomShipment("AMD 65 Single", "models/weapons/w_amd_65.mdl", "m9k_amd65",  0, 1, true, 750, true,{TEAM_GUN})
Line 519: AddCustomShipment("FN FAL Single", "models/weapons/w_fn_fal.mdl", "m9k_fal",  3000, 10, false, 123, false, {TEAM_BLACKMARKET})
Line 520: AddCustomShipment("FN FAL Single", "models/weapons/w_fn_fal.mdl", "m9k_fal",  0, 1, true, 750, true, {TEAM_BLACKMARKET})
Line 521: AddCustomShipment("M14", "models/weapons/w_snip_m14sp.mdl", "m9k_m14sp", 4000, 10, false, 123, false, {TEAM_UN})
Line 522: AddCustomShipment("M14 Single", "models/weapons/w_snip_m14sp.mdl", "m9k_m14sp",  0, 1, true, 750, true, {TEAM_GUN})

U use 2 spaces… after “m9k_”""" part

Shouldn’t matter

Both are named ‘single’ but I doubt if that makes any diff?


Line 521: AddCustomShipment("M14", "models/weapons/w_snip_m14sp.mdl", "m9k_m14sp", 4000, 10, false, 123, false, {TEAM_UN})

should be


Line 521: AddCustomShipment("M14", "models/weapons/w_snip_m14sp.mdl", "m9k_m14sp", 4000, 10, false, 123, false, {TEAM_GUN})

I did that and I still get the same error.

[editline]14th February 2014[/editline]

Ok, So I found the problem. I had to switch all of them from something like this


AddCustomShipment("M14", "models/weapons/w_snip_m14sp.mdl", "m9k_m14sp", 4000, 10, false, 123, false, {TEAM_GUN})

to some thing like this


AddCustomShipment("M14", {
	model = "models/weapons/w_snip_m14sp.mdl",
	entity = "m9k_m14sp",
	price = 4000,
	amount = 10,
	seperate = false,
	pricesep = 0,
	noship = false,
	allowed = {TEAM_GUN}
})

Doing that isn’t mandatory, but it is recommended for ease of reading. i still use the old way just because i like the way it looks and only takes up 1 line


AddCustomShipment("M4A1", "models/weapons/w_rif_m4a1.mdl", "weapon_mad_m4", 10000, 5, false, 1475, false, {TEAM_GUN})