Check for valid player inventory

This commit is contained in:
stujones11 2014-04-21 19:10:24 +01:00
parent eedf913638
commit 85f56f7ba0
1 changed files with 3 additions and 0 deletions

View File

@ -80,6 +80,9 @@ armor.set_player_armor = function(self, player)
end
local name = player:get_player_name()
local player_inv = player:get_inventory()
if not name or not player_inv then
return
end
local armor_texture = "3d_armor_trans.png"
local armor_level = 0
local armor_heal = 0