Garry's Mod

Error on line 22.

Submitted by ycb_x_beast_x, , Thread ID: 160542

Thread Closed
29-02-2020, 04:43 AM
#1
"[DarkRP] gamemodes/darkrp/gamemode/libraries/simplerr.lua:530: gamemodes/darkrp/gamemode/libraries/simplerr.lua:530: [ERROR] A runtime error has occurred in "addons/darkrpmodification/lua/darkrp_customthings/shipments.lua" on line 22.
The best help I can give you is this:

Corrupt shipment: Colt 1911!
The allowed field must be either an existing team or a table of existing teams.

Hints:
- Is there a job here that doesn't exist (anymore)?"

This is the error i got after adding more shipments to the gundealer, Here is an example of the shipments

"DarkRP.createShipment("Colt 1911", "models/weapons/s_dmgf_co1911.mdl", "m9k_colt1911", 62000, 10, false, 0, false, "Pistols", {TEAM_GUN})

DarkRP.createShipment("Colt 1911 Single", "models/weapons/s_dmgf_co1911.mdl", "m9k_colt1911", 6500, 1, false, 0, false, "Pistols", {TEAM_GUN})"

Can someone tell me why this isnt working i am really confused, Also the job for the gun dealer is TEAM_GUN so it should all match up?

RE: Error on line 22.

#2
So at first glance i would just redirect you to the DarkRP Wiki which says that the second argument must be a table, so in your case:

Code:
DarkRP.createShipment("Colt 1991", {
  model = "models/weapons/s_dmgf_co1911.mdl",
  entity = ""m9k_colt1911",
  price = 62000,
  amount = 10,
  separate = false,
  pricesep = nil,
  noship = false,
  allowed = {TEAM_GUN},
  category = "Pistols",
})

For all available fields check this.

Users browsing this thread: 1 Guest(s)