The above code loops forever... If you want to stop the script use the command below or to just exit the loop but stay in the script you can use a different "Goto/Label" command to put you outside the loop...
Halt() #stops a script
$x=0
:top
# do something
if($x=1)
goto(exit) #exit the loop only
endif
goto(top)
:exit
Print("finished")
ah thanks david.
Or in blocky, use the LOOP command titled LOOP FOREVER
It generates this code...
dj
is that only in the begin ? loop forever or is there at the end also a command.
The above code loops forever... If you want to stop the script use the command below or to just exit the loop but stay in the script you can use a different "Goto/Label" command to put you outside the loop...
thanks averyone.
This demonstrates both ways to exit the loop or script in blockly.
Use Blockly to learn how to program