• Shipments.lua giving me a hard time.
    7 replies, posted
Everything in AddCustomShipment format works fine. Everything else simply does not appear with console error. [CODE]--[[--------------------------------------------------------------------------- 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: https://github.com/FPtje/DarkRP/blob/master/gamemode/config/addentities.lua 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: ---------------------------------------------------------------------------]] //Pistols\\ AddCustomShipment("Colt 1911", "models/weapons/s_dmgf_co1911.mdl", "m9k_colt1911", 12000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("Colt Python", "models/weapons/w_colt_python.mdl", "m9k_coltpython", 14000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("Desert Eagle", "models/weapons/w_tcom_deagle.mdl", "m9k_deagle", 32000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("Glock 18", "models/weapons/w_dmg_glock.mdl", "m9k_glock", 20000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("HK USP", "models/weapons/w_pist_fokkususp.mdl", "m9k_usp", 14000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("HK 45C", "models/weapons/w_hk45c.mdl", "m9k_hk45", 12000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("M29 Satan", "models/weapons/w_m29_satan.mdl", "m9k_m29satan", 26000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("M92 Baretta", "models/weapons/w_beretta_m92.mdl", "m9k_m92beretta", 16000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("P08 Luger", "models/weapons/w_luger_p08.mdl", "m9k_luger", 26000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("Raging Bull", "models/weapons/w_taurus_raging_bull.mdl", "m9k_ragingbull", 28000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("Raging Bull Scoped", "models/weapons/w_raging_bull_scoped.mdl", "m9k_scoped_taurus", 30000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("Remington 1858", "models/weapons/w_remington_1858.mdl", "m9k_remington1858", 26000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("SW Model 3 Russian", "models/weapons/w_model_3_rus.mdl", "m9k_model3russian", 30000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("SW Model 500", "models/weapons/w_sw_model_500.mdl", "m9k_model500", 32000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("SW Model 627", "models/weapons/w_sw_model_627.mdl", "m9k_model627", 34000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("SIG Sauer P229R", "models/weapons/w_sig_229r.mdl", "m9k_sig_p229r", 26000, 10, false, 0, false, {TEAM_GUN}) DarkRP.createShipment("Cold 1911 - Single", { model = "models/weapons/s_dmgf_co1911.mdl", entity = "m9k_colt1911", price = 1200, amount = 1, separate = false, pricesep = 1200, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("Colt Python - Single", { model = "models/weapons/w_colt_python.mdl", entity = "m9k_coltpython", price = 1400, amount = 1, separate = false, pricesep = 1400, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("Desert Eagle - Single", { model = "models/weapons/w_tcom_deagle.mdl", entity = "m9k_deagle", price = 3200, amount = 1, separate = false, pricesep = 3200, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("Glock 18 - Single", { model = "models/weapons/w_dmg_glock.mdl", entity = "m9k_glock", price = 2000, amount = 1, separate = false, pricesep = 4800, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("HK 45C - Single", { model = "models/weapons/w_hk45c.mdl", entity = "m9k_hk45", price = 1400, amount = 1, separate = false, pricesep = 4800, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("M29 Satan - Single", { model = "models/weapons/w_m29_satan.mdl", entity = "m9k_m92satan", price = 1200, amount = 1, separate = false, pricesep = 4800, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("M92 Baretta - Single", { model = "models/weapons/w_beretta_m92.mdl", entity = "m9k_m92beretta", price = 2600, amount = 1, separate = false, pricesep = 4800, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("P08 Luger - Single", { model = "models/weapons/w_luger_p08.mdl", entity = "m9k_luger", price = 2600, amount = 1, separate = false, pricesep = 4800, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("Raging Bull - Single", { model = "models/weapons/w_taurus_raging_bull.mdl", entity = "m9k_ragingbull", price = 2800, amount = 1, separate = false, pricesep = 4800, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("Raging Bull Scoped - Single", { model = "models/weapons/w_raging_bull_scoped.mdl", entity = "m9k_scoped_taurus", price = 3000, amount = 1, separate = false, pricesep = 4800, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("Remington 1858 - Single", { model = "models/weapons/w_remington_1858.mdl", entity = "m9k_remington1858", price = 2600, amount = 1, separate = false, pricesep = 4800, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("SW Model 3 Russian - Single", { model = "models/weapons/w_model_3_rus.mdl", entity = "m9k_model3russian", price = 3000, amount = 1, separate = false, pricesep = 4800, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("SW Model 500 - Single", { model = "models/weapons/w_sw_model_500.mdl", entity = "m9k_model500", price = 3600, amount = 1, separate = false, pricesep = 4800, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("SW Model 627 - Single", { model = "models/weapons/w_sw_model_627.mdl", entity = "m9k_model627", price = 3400, amount = 1, separate = false, pricesep = 4800, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) DarkRP.createShipment("SIG Sauer P229R - Single", { model = "models/weapons/w_sig_229r.mdl", entity = "m9k_sig_p229r", price = 2600, amount = 1, separate = false, pricesep = 4800, noship = true, allowed = {TEAM_GUN}, category = "Singles", }) //Assault Rifles\\ AddCustomShipment("ACR", "models/weapons/w_masada_acr.mdl", "m9k_acr", 65000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("AK-47", "models/weapons/w_ak47_m9k.mdl", "m9k_ak47", 46000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("AK-74", "models/weapons/w_tct_ak47.mdl", "m9k_ak74", 46000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("AMD 65", "models/weapons/w_amd_65.mdl", "m9k_amd65", 48000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("AN-94", "models/weapons/w_rif_an_94.mdl", "m9k_an94", 50000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("AS VAL", "models/weapons/w_dmg_vally.mdl", "m9k_val", 42000, 10, false, 0, false, {TEAM_GUN}) AddCustomShipment("F2000", "models/weapons/w_fn_f2000.mdl", "m9k_f2000", 44000, 10, false, 0, false, {
Post the error.
The was an error regarding the missing " on line 1133 and 1212, but since I fixed those. The DarkRP.creatShipments simply dont work.
Remove the commas after the category field, if that doesn't sort it out, try putting a line between each shipment.
[code] DarkRP.createCategory{ name = "Singles", categorises = "shipments", startExpanded = true, color = Color(0, 107, 0, 255), canSee = fp{fn.Id, true}, sortOrder = 100, } [/code] (!) Post the exact error if this doesn't fix it
[lua] DarkRP.createShipment("MP5 - Single", { model = "models/cw2/weapons/w_mp5_cqb.mdl", entity = "cw_cod4_mp5, price = 3200, amount = 1, separate = false, pricesep = 1500, noship = true, allowed = {TEAM_EXTREME}, category = "Singles", }) [/lua] entity = "cw_cod4_mp5, --YOU did not close the "
[QUOTE=kulcris;48790020][lua] DarkRP.createShipment("MP5 - Single", { model = "models/cw2/weapons/w_mp5_cqb.mdl", entity = "cw_cod4_mp5, price = 3200, amount = 1, separate = false, pricesep = 1500, noship = true, allowed = {TEAM_EXTREME}, category = "Singles", }) [/lua] entity = "cw_cod4_mp5, --YOU did not close the "[/QUOTE] [QUOTE=deadpotato363;48781811]The was an error regarding the missing " on line 1133 and 1212, but since I fixed those. The DarkRP.creatShipments simply dont work.[/QUOTE]
Gonna guess it's because you're missing arguments in the createShipment table, take a look at what's optional and what's not, [URL="http://wiki.darkrp.com/index.php/DarkRP:CustomShipmentFields"]CustomShipmentFields[/URL]. May not be the issue as I've never messed around with darkrp, but that'd be a start.
Sorry, you need to Log In to post a reply to this thread.