ID:268337
 
Ok a few questions with spawn...


I know you use spawn to avoid infinite loops...

the thing is, if you have spawns inside of eachother, is that ok?


spawn()
usr.money()
spawn(30)
usr.money()


that's fine isn't it? Is there ever a time when you shouldn't use spawn? Other then if you wanted to have the proc go first before the code below it...

and what if I put a return like so

spawn()
usr.Forgetful()
spawn()
usr.Forget()
return

the 2nd spawn will still run, even though the rest of the procedure has stopped, correct?
Jon Snow wrote:
Ok a few questions with spawn...


I know you use spawn to avoid infinite loops...

the thing is, if you have spawns inside of eachother, is that ok?


spawn()
usr.money()
spawn(30)
usr.money()


that's fine isn't it? Is there ever a time when you shouldn't use spawn? Other then if you wanted to have the proc go first before the code below it...

In that example, it wouldn't matter if you use spawn unless there was something following it.

and what if I put a return like so

spawn()
usr.Forgetful()
spawn()
usr.Forget()
return

the 2nd spawn will still run, even though the rest of the procedure has stopped, correct?

You can always test it out, y'know? ;)