Jump to content

What's is wrong in this script? HELP


s1mple

Recommended Posts

Posted
    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) 

Posted
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.

  • 1 month later...
Posted
    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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...