Thanks you guys. I'll try that out.
Quote:
Originally Posted by DustyPorViva
Why do:
for (temp.i = 3; i > 0; i --) {
sleep(1);
}
instead of just doing sleep(3)?
|
Isn't the for (temp.i = 3; i > 0; i --) {} thing an array? (correct me if i'm wrong but i think thats what its called)
I've seen these alot. and apparently it can be very useful in certain script.
Could someone explain how this works? Its always seemed very confusing to me. reading how "for" works in the offline editor helps a little, but what's it checking? and what exactly is that script doing?
i would guess it's checking if temp.i = 3. or is it setting it to 3? then telling it it's greater than 0 then subtracting 1?
or, by looking at Dusty's comment, is it producing three one second sleeps?
then once temp.i == 0, it tells it to stop telling it to sleep.. or something?
and where's it pulling the initial value for temp.i from anyway?