Exiting While Loops

Hi I am trying to use break to exit a while loop but it keep giving me a syntax error.
New users to Opto Script.

Please help.


Unfortunately, there is no break statement available for any of the loops in Optoscript.

For while and repeat loops you can use a variable as a flag and check it as part of the loop condition to exit the loop. Certainly not as clean as having break and continue statements, but it is what it is.


Thank you, lol I was afraid that was going to be the case.
But! like you said it is what it is thanks a lot for the help Philip. :+1: