Broken Shipments?

Hello Facepunch! I have been coding with my Garry’s Mod DarkRP server for a while, and I was almost done solving the single shipment error we have been trying to fix; then after fixing it, I attempted to change the price of a weapon, and it totally broken Shipments and the recently fixed weapons.

Here’s the errors:

[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:20: ‘=’ expected near ‘AddCustomShipment’

  1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:0

Corrupt Entity “Sniper Ammo”: element model is corrupt.

[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:20: ‘=’ expected near ‘AddCustomShipment’

  1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:0

Corrupt Entity “Sniper Ammo”: element model is corrupt.

[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:16: ‘=’ expected near ‘AddCustomShipment’

  1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:0

[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:16: ‘=’ expected near ‘AddCustomShipment’

  1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:0

[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:16: ‘=’ expected near ‘AddCustomShipment’

  1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:0

[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:16: ‘=’ expected near ‘AddCustomShipment’

  1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/shipments.lua:0

The code:

w/---------------------------------------------------------------------------
/
---------------------------------------------------------------------------
DarkRP custom shipments and guns

This file contains your custom shipments and guns.
This file should also contain shipments and guns from DarkRP that you edited.

Note: If you want to edit a default DarkRP shipment, first disable it in darkrp_config/disabled_defaults.lua
Once you’ve done that, copy and paste the shipment to this file and edit it.

The default shipments and guns can be found here:
<TODO: INSERT URL HERE>

For examples and explanation please visit this wiki page:
http://wiki.darkrp.com/index.php/DarkRP:CustomShipmentFields

Add shipments and guns under the following line:
---------------------------------------------------------------------------*
AddCustomShipment(“Galil”, “models/weapons/w_rif_galil.mdl”, “weapon_real_cs_galil”, 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“AK47”, “models/weapons/w_rif_ak47.mdl”, “weapon_real_cs_ak47”, 4000, 10, false, 550, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“M4A1”, “models/weapons/w_rif_m4a1.mdl”, “weapon_real_cs_m4a1”, 3900, 10, false, 500, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“Famas”, “models/weapons/w_rif_famas.mdl”, “weapon_real_cs_famas”, 3900, 10, false, 450, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“AWP”, “models/weapons/w_snip_awp.mdl”, “weapon_real_cs_awp”, 5000, 10, false, 700, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“Scout”, “models/weapons/w_snip_scout.mdl”, “weapon_real_cs_scout”, 4500, 10, false, 650, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“SteyrAug”, “models/weapons/w_rif_aug.mdl”, “weapon_real_cs_aug”, 4000, 10, false, 600, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“SG552”, “models/weapons/w_rif_sg552.mdl”, “weapon_real_cs_sg552”, 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“G3SG1”, “models/weapons/w_snip_g3sg1.mdl”, “weapon_real_cs_g3sg1”, 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“SG550”, “models/weapons/w_snip_sg550.mdl”, “weapon_real_cs_sg550”, 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“UMP45”, “models/weapons/w_smg_ump45.mdl”, “weapon_real_cs_ump_45”, 3600, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“P90”, “models/weapons/w_smg_p90.mdl”, “weapon_real_cs_p90”, 3500, 10, false, 350, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“TMP”, “models/weapons/w_smg_tmp.mdl”, “weapon_real_cs_tmp”, 3500, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“MP5”, “models/weapons/w_smg_mp5.mdl”, “weapon_real_cs_mp5a5”, 3200, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“Mac10”, “models/weapons/w_smg_mac10.mdl”, “weapon_real_cs_mac10”, 3000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“AutoShotgun”, “models/weapons/w_shot_xm1014.mdl”, “weapon_real_cs_xm1014”, 3000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“Shotgun”, “models/weapons/w_shot_m3super90.mdl”, “weapon_real_cs_pumpshotgun”, 2500, 10, true, 300, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“Grenade”, “models/weapons/w_eq_fraggrenade.mdl”, “weapon_real_cs_grenade”, 15000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“Flash”, “models/weapons/w_eq_flashbang_thrown.mdl”, “weapon_real_cs_flash”, 2000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“Smoke”, “models/weapons/w_eq_smokegrenade.mdl”, “weapon_real_cs_smoke”, 2000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“Knife”, “models/weapons/w_knife_t.mdl”, “weapon_real_cs_knife”, 2000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment(“Water”, “models/drug_mod/the_bottle_of_water.mdl”, “durgz_water”, 100, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment(“Budweiser”, “models/drug_mod/alcohol_can.mdl”, “durgz_alchol”, 500, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment(“Aspirin”, “models/jaanus/aspbtl.mdl”, “durgz_aspirin”, 800, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment(“Cigarette”, “models/boxopencigshib.mdl”, “durgz_cigarette”, 400, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment(“Weed”, “models/katharsmodels/contraband/zak_wiet/zak_wiet.mdl”, “durgz_weed”, 1200, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment(“Cocaine”, “models/cocn.mdl”, “durgz_cocaine”, 1600, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment(“LSD”, “models/smile/smile.mdl”, “durgz_lsd”, 1100, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment(“Heroine”, “models/katharsmodels/syringe_out/syringe_out.mdl”, “durgz_heroine”, 1000, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment(“Mushroom”, “models/ipha/mushroom_small.mdl”, “durgz_mushroom”, 1400, 10, false, 0, false, {TEAM_DRUG})

AddCustomShipment(“P228”, {
model = “models/weapons/w_pist_p228.mdl”,
entity = “weapon_real_cs_p228”,
price = 5000,
amount = 10,
separate = true,
pricesep = 220,
noship = true,
allowed = {TEAM_GUN}
})
AddCustomShipment(“FN Five-seven”, {
model = “models/weapons/w_pist_fiveseven.mdl”,
entity = “weapon_real_cs_five-seven”,
price = 5000,
amount = 10,
separate = true,
pricesep = 230,
noship = true,
allowed = {TEAM_GUN}
})

AddCustomShipment(“Dual Elites”, {
model = “models/weapons/w_pist_elite_dropped.mdl”,
entity = “weapon_real_cs_elites”,
price = 5000,
amount = 1,
separate = true,
pricesep = 500,
noship = true,
allowed = {TEAM_GUN}
})

AddCustomShipment(“Desert Eagle”, {
model = “models/weapons/w_pist_deagle.mdl”,
entity = “weapon_real_cs_desert_eagle”,
price = 5000,
amount = 10,
separate = true,
pricesep = 210,
noship = true,
allowed = {TEAM_GUN}
})

AddCustomShipment(“HK USP”, {
model = “models/weapons/w_pist_usp.mdl”,
entity = “weapon_real_cs_usp”,
price = 5000,
amount = 1,
separate = true,
pricesep = 300,
noship = true,
allowed = {TEAM_GUN}
})

AddCustomShipment(“Glock 18”, {
model = “models/weapons/w_pist_glock18.mdl”,
entity = “weapon_real_cs_glock18”,
price = 5000,
amount = 10,
separate = true,
pricesep = 210,
noship = true,
allowed = {TEAM_GUN}
})

Use code tags.

http://wiki.darkrp.com/index.php/DarkRP:CustomShipmentFields

To me, your shipments look totally different in terms of format.

I recommend not doing this


AddCustomShipment("Galil", "models/weapons/w_rif_galil.mdl", "weapon_real_cs_galil", 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("AK47", "models/weapons/w_rif_ak47.mdl", "weapon_real_cs_ak47", 4000, 10, false, 550, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("M4A1", "models/weapons/w_rif_m4a1.mdl", "weapon_real_cs_m4a1", 3900, 10, false, 500, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Famas", "models/weapons/w_rif_famas.mdl", "weapon_real_cs_famas", 3900, 10, false, 450, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("AWP", "models/weapons/w_snip_awp.mdl", "weapon_real_cs_awp", 5000, 10, false, 700, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Scout", "models/weapons/w_snip_scout.mdl", "weapon_real_cs_scout", 4500, 10, false, 650, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("SteyrAug", "models/weapons/w_rif_aug.mdl", "weapon_real_cs_aug", 4000, 10, false, 600, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("SG552", "models/weapons/w_rif_sg552.mdl", "weapon_real_cs_sg552", 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("G3SG1", "models/weapons/w_snip_g3sg1.mdl", "weapon_real_cs_g3sg1", 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("SG550", "models/weapons/w_snip_sg550.mdl", "weapon_real_cs_sg550", 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("UMP45", "models/weapons/w_smg_ump45.mdl", "weapon_real_cs_ump_45", 3600, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("P90", "models/weapons/w_smg_p90.mdl", "weapon_real_cs_p90", 3500, 10, false, 350, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("TMP", "models/weapons/w_smg_tmp.mdl", "weapon_real_cs_tmp", 3500, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("MP5", "models/weapons/w_smg_mp5.mdl", "weapon_real_cs_mp5a5", 3200, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Mac10", "models/weapons/w_smg_mac10.mdl", "weapon_real_cs_mac10", 3000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("AutoShotgun", "models/weapons/w_shot_xm1014.mdl", "weapon_real_cs_xm1014", 3000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Shotgun", "models/weapons/w_shot_m3super90.mdl", "weapon_real_cs_pumpshotgun", 2500, 10, true, 300, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Grenade", "models/weapons/w_eq_fraggrenade.mdl", "weapon_real_cs_grenade", 15000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Flash", "models/weapons/w_eq_flashbang_thrown.mdl", "weapon_real_cs_flash", 2000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Smoke", "models/weapons/w_eq_smokegrenade.mdl", "weapon_real_cs_smoke", 2000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Knife", "models/weapons/w_knife_t.mdl", "weapon_real_cs_knife", 2000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Water", "models/drug_mod/the_bottle_of_water.mdl", "durgz_water", 100, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment("Budweiser", "models/drug_mod/alcohol_can.mdl", "durgz_alchol", 500, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment("Aspirin", "models/jaanus/aspbtl.mdl", "durgz_aspirin", 800, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment("Cigarette", "models/boxopencigshib.mdl", "durgz_cigarette", 400, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment("Weed", "models/katharsmodels/contraband/zak_wiet/zak_wiet.mdl", "durgz_weed", 1200, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment("Cocaine", "models/cocn.mdl", "durgz_cocaine", 1600, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment("LSD", "models/smile/smile.mdl", "durgz_lsd", 1100, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment("Heroine", "models/katharsmodels/syringe_out/syringe_out.mdl", "durgz_heroine", 1000, 10, false, 0, false, {TEAM_DRUG})
AddCustomShipment("Mushroom", "models/ipha/mushroom_small.mdl", "durgz_mushroom", 1400, 10, false, 0, false, {TEAM_DRUG})

It can be hard to find what’s wrong when it’s all jumbled up like this.
Set up the code structure how the default shipments are set up. It’s a great way of organizing your code and coming back to it later.