attempt to perform arithmetic on global 'models' (a nil value)
1 replies, posted
This is the error that I have. I'm not sure what the problem is and I have tried looking but I can't find it. Would appreciate assistance.
[CODE][ERROR] A runtime error has occurred in "addons/darkrpmodification-master/lua/darkrp_customthings/entities.lua" on line 28.
The best help I can give you is this:
attempt to perform arithmetic on global 'models' (a nil value)
Hints:
- No hints, sorry.
The responsibility for this error lies with (the authors of) one (or more) of these files:
1. addons/darkrpmodification-master/lua/darkrp_customthings/entities.lua on line 28
2. gamemodes/darkrp/gamemode/libraries/fn.lua on line 82
3. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 131
4. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 142
5. gamemodes/darkrp/gamemode/init.lua on line 81
------- End of Simplerr error -------
[DarkRP] There is 1 Lua problem![/CODE]
[CODE]--[[---------------------------------------------------------------------------
DarkRP custom entities
---------------------------------------------------------------------------
This file contains your custom entities.
This file should also contain entities from DarkRP that you edited.
Note: If you want to edit a default DarkRP entity, first disable it in darkrp_config/disabled_defaults.lua
Once you've done that, copy and paste the entity to this file and edit it.
The default entities can be found here:
https://github.com/FPtje/DarkRP/blob/master/gamemode/config/addentities.lua#L111
For examples and explanation please visit this wiki page:
http://wiki.darkrp.com/index.php/DarkRP:CustomEntityFields
Add entities under the following line:
---------------------------------------------------------------------------]]
AddCustomShipment("Cigarettes", "models/boxopencigshib.mdl", "durgz_cigarette", 150, 10, false, 0, false, {TEAM_DRUGGY})
AddCustomShipment("Beer", "models/drug_mod/alcohol_can.mdl", "durgz_alcohol", 200, 10, false, 0, false, {TEAM_DRUGGY})
AddCustomShipment("Weed", "models/katharsmodels/contraband/zak_wiet/zak_wiet.mdl", "durgz_weed", 400, 10, false, 0, false, {TEAM_DRUGGY})
AddCustomShipment("Heroine", "models/katharsmodels/syringe_out/syringe_out.mdl", "durgz_heroine", 250, 10, false, 0, false, {TEAM_DRUGGY})
AddCustomShipment("Cocaine", "models/cocn.mdl", "durgz_cocaine", 500, 10, false, 0, false, {TEAM_DRUGGY})
AddCustomShipment("Aspirin", "models/jaanus/aspbtl.mdl", "durgz_aspirin", 400, 10, false, 0, false, {TEAM_DRUGGY})
AddCustomShipment("LSD", "models/smile/smile.mdl", "durgz_lsd", 600, 10, false, 0, false, {TEAM_DRUGGY})
AddCustomShipment("Mushroom", "models/ipha/mushroom_small.mdl", "durgz_mushroom", 550, 10, false, 0, false, {TEAM_DRUGGY})
AddCustomShipment("smgP90","m9k_smgp90", "m9k_smgp90", 1200, 10, false,1000, true , TEAM_GUN, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("Mp5","m9k_mp5", "m9k_mp5", 1100, 10, false,1000, true , TEAM_GUN, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("UMP45","m9k_ump45", "m9k_ump45", 1300, 10, false,1000, true , TEAM_GUN, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("KacPDW","m9k_kac_pdw", "m9k_kac_pdw", 1500, 10, false,1000, true , TEAM_GUN, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("mp5sd","m9k_mp5sd", "m9k_mp5sd", 1400, 10, false,1000, true , TEAM_GUN, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("remington870","m9k_remington870", "m9k_remington870", 1500, 10, false,1000, true , TEAM_HGUN, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("jackhammer","m9k_jackhammer", "m9k_jackhammer", 2200, 10, false,1000, true , TEAM_HGUN, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("barretm82","m9k_barret_m82", "m9k_barret_m82", 2000, 10, false,1000, true , TEAM_HGUN, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("ak74","m9k_ak74", "m9k_ak74", 1400, 10, false,1000, true , TEAM_HGUN, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("m249lmg","m9k_m249lmg", "m9k_m249lmg", 3400, 10, false,1000, true , TEAM_HGUN, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("tar21","m9k_tar21", "m9k_tar21", 2200, 10, false,1000, true , TEAM_HGUN, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("Colt1911","m9k_colt1911", "m9k_colt1911", 600, 6, true, 200, true ,{TEAM_HGUN, TEAM_GUN}, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("ColtPython","m9k_coltpython", "m9k_coltpython", 800, 8, true, 300, true , {TEAM_HGUN, TEAM_GUN}, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("USP","m9k_usp", "m9k_usp", 500, 5, true, 100, true , {TEAM_HGUN, TEAM_GUN}, models/props_junk/wood_crate001a.mdl)
AddCustomShipment("Deagle","m9k_deagle", "m9k_deagle", 600, 6, true, 300, true , {TEAM_HGUN, TEAM_GUN}, models/props_junk/wood_crate001a.mdl)
AddEntity("Advanced Money Printer", { --- The name that will show in your F4 shop
ent = "advanced_money_printer", --- The exact folder name for the printer
model = "models/props_c17/consolebox01a.mdl", --- The model you want shown in your F4 shop, can be anything really
price = 15000, --- How much it costs
max = 1, --- How many you can buy
cmd = "buyadvancedmoneyprinter" --- A chat command to buy it, dont manually put in a / or !
})
AddEntity("Professional Money Printer", { --- The name that will show in your F4 shop
ent = "professional_money_printer", --- The exact folder name for the printer
model = "models/props_c17/consolebox01a.mdl", --- The model you want shown in your F4 shop, can be anything really
price = 15000, --- How much it costs
max = 1, --- How many you can buy
cmd = "buyprofessionalmoneyprinter" --- A chat command to buy it, dont manually put in a / or !
})[/CODE]
[highlight](User was banned for this post ("Didn't read the sticky" - Asaratha))[/highlight]
-snip, you messed up adding the weapons-
[editline]10th July 2015[/editline]
Compare how you added the drugs to how you added the weapon. The format you used for adding the drugs should be the same for the weapons.
Sorry, you need to Log In to post a reply to this thread.