1
2
3
2
3
if hunger[id] < 150 then 	hunger[id] = hunger[id]+10 end
There's no way someone can get more than 150 "hunger points?" with this code...
...Unless there's another way to earn them, in which case you would use something like this:
1
2
3
4
5
2
3
4
5
if (hunger[id]+10) <= 150 then 	hunger[id] = hunger[id]+10 else 	hunger[id] = 150 end