Talk:Do while

From Second Life Wiki
Jump to: navigation, search

This is a bit of a hack. Because of the syntax of do-while, it can't use the normal template; and I'm not keen on modifying the template for just one page. So I went up to the root template. Strife Onizuka 13:57, 8 February 2007 (PST)

Is the bottom loop faster?

Is the bottom loop faster than the one on the top (if they were to both count to 5).Bobbyb30 Zohari 14:54, 28 February 2008 (PST)

They both execute the same number of iterations and the same amount of bytecode, the only difference is the ordering of the operations. There is no reason to assume one or the other loop is faster. -- Strife Onizuka 17:41, 28 February 2008 (PST)

Interesting phenomenon

If a script is looping (do while) when the object it's in is taken in to inventory and the script has an on_rez() llResetScript() set, the script never registers the on_rez()!! Thus the script does not reset. Also; What would you recommend as the best method to break into a loop? I made one script with a llSetScriptState() and llResetOtherScript() but if you wanted to do that in a linked prim it would fail cause of the same prim limit of llResetOtherScript() etc. Any advice would be greatly appreciated as usual. -- Eddy (talk|contribs) 18:05, 10 June 2009 (UTC)

That is correct, events are not Wikipedia:interrupts; that is to say they queue. Should probably put something about this in the on_rez and attach articles since that is where the pain is most often felt. I think there is something about it on the Events article... -- Strife (talk|contribs) 02:39, 11 June 2009 (UTC)

Thanx Strife. -- Eddy (talk|contribs) 14:40, 13 June 2009 (UTC)