xeon17 Posted March 9, 2017 Posted March 9, 2017 How do i know if a table row is empty? if(self.playerWeapons[player]) then for weapon,ammo in pairs(self.playerWeapons[player]) do player:giveWeapon(weapon, ammo, true) end else -- if empty (this does not work) self:setDefaultWeapons(player) end self.playerWeapons[player] = nil
xeon17 Posted March 9, 2017 Author Posted March 9, 2017 Error: [string "if (#test[me] == 0) then print("empty") end"]:1: attempt to get length of field '?' (a boolean value)
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