s1mple Posted October 3, 2015 Share Posted October 3, 2015 for i,weaponData in ipairs(weaponAmmoTable["Makarov Mag"]) do if weaponName == weaponData[1] then return "Makarov Mag",weaponData[2] end end [2015-10-03 05:55:24] ERROR: [DAYZ]/DayZ/pickups.lua:470: attempt to index global 'weaponAmmoTable' (a nil value) [2015-10-03 05:55:24] ERROR: [DAYZ]/DayZ/pickups.lua:470: attempt to index global 'weaponAmmoTable' (a nil value) Link to comment
SpecT Posted October 3, 2015 Share Posted October 3, 2015 The table "weaponAmmoTable" is empty. Are you sure that there is data in it ? Link to comment
Fist Posted October 3, 2015 Share Posted October 3, 2015 How to fix it? well my friend, that script above is fine. Probably you missed something to add to your DayZ gamemode when u was adding new weapon. Link to comment
jingzhi Posted November 19, 2015 Share Posted November 19, 2015 for i,weaponData in ipairs(weaponAmmoTable["Makarov Mag"]) do if weaponName == weaponData[1] then return "Makarov Mag",weaponData[2] end end [2015-10-03 05:55:24] ERROR: [DAYZ]/DayZ/pickups.lua:470: attempt to index global 'weaponAmmoTable' (a nil value) [2015-10-03 05:55:24] ERROR: [DAYZ]/DayZ/pickups.lua:470: attempt to index global 'weaponAmmoTable' (a nil value) Post the full code so that we can help you Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now