well, heres my problem. i have a proc which loops...
proc
counter(counter_stop)
if(num==0)
world<<"sorry, the answer was [answer]"
else
if(counter_stop==0)
num-=1
world<<"[num]"
spawn(10) call(/proc/counter)()
...and i can't stop it from counting down until it reaches zero, not even if i have another proc like this...
proc
turn_off_counter()
counter_stop=1
...plz help me, why doesn't this last proc stop the first proc? someone help...
ID:174662
Jul 27 2003, 12:47 pm
|
|
I would suggest something like this:
mob/proc/counter(counter_stop) |
In response to FranquiBoy
|
|
i tried your code out, but it just kept decreasing. should you have put a else cause in that?
|
In response to FranquiBoy
|
|
counter()
if(num==0) world<<"sorry, the answer was [answer]" else num-=1 world<<"[num]" spawn(10) if(!counter_stop) counter() turn_off_counter() counter_stop=1 Your right, I do need an else, try it now |
Change to:
add gobal variable var/counter_stop=0
counter()
if(num==0)
world<<"sorry, the answer was [answer]"
num-=1
world<<"[num]"
spawn(10)
if(!counter_stop)counter()
turn_off_counter()
counter_stop=1