Usage:

goto label

Example:

goto thirdLabel

Allows you to jump to any label, anywhere in the script and then continue on down the script line by line as normal (or until it reaches another command to force it to jump elsewhere again).

In the following example, the bot will read the first line and echo the first message following it, then jump to the third label and echo that message, then jump to the second label and echo that message twice, and then for lack of another jump it will continue down the script to the third label again, echo that message, then jump back to the second label again... thus entering an endless loop of the second and third labels.

This produces the following results in the bot:



ScriptControlStructures

Goto (last edited 2013-08-06 17:38:02 by Inanna)