Forum

> > CS2D > Scripts > In array to sec...
Forums overviewCS2D overview Scripts overviewLog in to reply

English In array to sec...

22 replies
Page
To the start Previous 1 2 Next To the start

old Re: In array to sec...

Zeik
User Off Offline

Quote
1
2
3
if hunger[id] < 150 then
	hunger[id] = hunger[id]+10
end
Way easier to understand.. at least for me and probably most beginners.

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
if (hunger[id]+10) <= 150 then
	hunger[id] = hunger[id]+10
else
	hunger[id] = 150
end
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview