Abohak Posted August 23, 2016 Share Posted August 23, 2016 elseif (data == "temperature") then local current = getElementData(player, data); if (current+value > 41) then setElementData(player, data, 41); elseif (current+value <= 31) then setElementData(player, data, 31); else setElementData(player, data, (current+value)); end ”ERROR : DayZ\handlers\players\server\consume_player.lua:43: attempt to perform arithmetic on local `value` Link to comment
roaddog Posted August 23, 2016 Share Posted August 23, 2016 elseif (data == "temperature") then local current = tonumber(getElementData(player, data)) or 0; if (current+value > 41) then setElementData(player, data, 41); elseif (current+value <= 31) then setElementData(player, data, 31); else setElementData(player, data, (current+value)); end 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