diff --git a/tools/solar_helmet.lua b/tools/solar_helmet.lua index 6493507..d6bdc92 100644 --- a/tools/solar_helmet.lua +++ b/tools/solar_helmet.lua @@ -22,7 +22,7 @@ local function onGlobalStep(player,inv,stack) if stack:get_name()~="industrialtest:solar_helmet" then return false end - local amount=math.floor(minetest.get_node_light(player:get_pos())/2) + local amount=math.floor((minetest.get_node_light(player:get_pos()) or 0)/2) if amount==0 then return true end