-Illuminati- 1 Posted July 19, 2015 Report Share Posted July 19, 2015 2nd time I have done this just to check for something, not realizing I should of put a stop script command in there... If you don't know what's going on here, I ran the node which would be an infinite loop since in the current browser, the element in fact $exists, so I basically can't do anything else, no saving, no modifying ... You get it though. http://puu.sh/j5fnC/82fe503f24.png 1 Quote Link to post Share on other sites
the_way 52 Posted July 20, 2015 Report Share Posted July 20, 2015 yeah, its bad code, not sure if there are many members would use that technique, 1 Quote Link to post Share on other sites
-Illuminati- 1 Posted July 22, 2015 Author Report Share Posted July 22, 2015 yeah, its bad code, not sure if there are many members would use that technique,It's bad code to run a loop to see if the $exists element is working correctly? Quote Link to post Share on other sites
Frank 177 Posted July 22, 2015 Report Share Posted July 22, 2015 I think the bad is not giving the loop another way out. If the element never stops existing the program is stuck. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted July 22, 2015 Report Share Posted July 22, 2015 You can add another condition or more. ANDOR set(#index, 0, "Global") loop while($comparison(#first cond, "=", "true") AND $comparison(#second cond, "=", "true")) { wait(1) increment(#index) } ui check box("first condition", #first cond) ui check box("second condition", #second cond) ui stat monitor("index: {#index}", "") stop script loop while("{$comparison(#first cond, "=", "true")}{$comparison(#second cond, "=", "true")}") { wait(1) increment(#index) } or see attached file works in ubot 4 for sure CDexample--loop while 2 conditions are true.ubot 1 Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted July 22, 2015 Report Share Posted July 22, 2015 I think the bad is not giving the loop another way out. If the element never stops existing the program is stuck.yes a "break" would be nice, fundamentals.... fundamentals. Quote Link to post Share on other sites
the_way 52 Posted July 23, 2015 Report Share Posted July 23, 2015 haha if we ever all attend a "best coding practises" seminar for ubot, i'm sure there wouldn't be a quiet moment at all! Quote Link to post Share on other sites
Frank 177 Posted August 2, 2015 Report Share Posted August 2, 2015 Also another way is just toss in a wait 1 in the loop too. Quote Link to post Share on other sites
the_way 52 Posted August 3, 2015 Report Share Posted August 3, 2015 Also another way is just toss in a wait 1 in the loop too. Oh Frank Frank Frank, how could you whisper such vile nonsense Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.