Hey guys,
Made a supposed to be simple function for working out "hunger"
But apparently does not work:
[CODE]function hungernew(hunger)
local hungerreal = 0.8/#hunger
return #hungerreal
end[/CODE]Error I get is:
attempt to get length of local 'hunger' (a number value)
Any help would be greatly appreciated and welcome since it all adds to my knowledge of Lua and Gmod.
P.S Sorry but don't seem to know how to show the function better than that :P
Like the error says, you are trying to get the length (#) of a number value, remove the # in front of hunger.
[editline]06:11PM[/editline]
And the one in front of hungerreal.
Thanks, It worked!
Sorry, you need to Log In to post a reply to this thread.