I can use the "stop this script" or "stop this block" to break out of a loop.
Is there a best approach for using "continue"?
My best approach so far is isolating the loop into its own script upon when I receive ... then broadcast and stop this script to restart another instance. It isn't clean. I would love to just restart the loop.
what do you mean by "restart the loop"?
What I would do is make a loop like this:
However, something like this is more compact:
Hope this helps!
The catch block from the tools library. Put it inside the loop for continue, and outside the loop for break.
The best thing I could suggest for restarting a loop is using my project's custom blocks. Here's the project.
Use these blocks:
The FOR I=1 TO 100 is the loop we're trying to continue or break out of. The stuff in the REPEAT 10 is just a random way to spend enough time in each value of I in the FOR loop so you can type C for continue or B for break and tell that it worked -- B just stops the whole loop, but C goes to the next value of I. @spaceelephant
had this idea, but there's no more Tools library; the CATCH and THROW blocks are in Iteration, the first library in the list.