Difference between revisions of "GoTo"
no edit summary
imported>Haama (Updated notes, standardized alias wording) |
imported>SpookyFX |
||
Line 4: | Line 4: | ||
GoTo ''[labelID]'' | GoTo ''[labelID]'' | ||
An alias for [[RestoreIP]]. This command causes script processing to jump to a label defined within the same script. Use [[Label]] or [[SaveIP]] to define the instruction point to which to jump. Optional label IDs allow for multiple labels or nested loops within a script. | An alias for [[RestoreIP]]. This command causes script processing to jump to a label defined within the same script. Use [[Label]] or [[SaveIP]] to define the instruction point to which to jump. | ||
'''Basic Example:''' | |||
<pre> | |||
set Count to GetActiveEffectCount | |||
Label | |||
if ( count > 0 ) | |||
if GetNthActiveEffectCaster count == player | |||
messagebox "Player put a Hex on me!" | |||
endif | |||
set count to count - 1 | |||
Goto | |||
endif | |||
end | |||
</pre> | |||
Optional label IDs allow for multiple labels or nested loops within a script. | |||
'''Example:''' | '''Example:''' |