ID:141561
 
Code:
mob/proc/Weather()
>> spawn while(1)
>> >> sleep(10)
>> >> usr.Hunger += 1

(Each >> means 1 tab as the thing is freaking out.)

Problem description: I can't get the usr's Hunger variable to go down once per second. The variable is capitalised, so i dont see what is wrong.

Edit: The forum freaked out on me - fixed now.
If you want to value to go down. Why are you adding 1? And no usr in procs.
dont use spawn() thats not what its for. like this:

world/proc/Hunger() for()  // take note of the for loop here
sleep(10)
hunger -= 1
if(hunger <= 0) StarveToDeath()



spawn is like sleep but everything past it happens right away, and everything under it waits. sleep waits and then everything under it happens. your overloading the system with: "in an amount of time do this" and sinse your waiting a second a couple hundred thousand of those have time to pile up and it crashes.
In response to Expert Novice
You spawn a loop so you can actually continue the proc it was called in.
mob/Login()
..()
Weather()
Boop()

If Weather didn't spawn the loop, Boop would never be called, because it's an infinite loop.

An empty for() is the same as an always-true expression in while().
And it's a mob proc.