goto
Loops and jumps in Xtscript use the goto @target command
[...] = optional ... = your value
@...
[...
...]
goto @...
Notes
WARNING:
Endless or very large loops will cause xtscript timeouts!
Example code
<!--parser:xtscript-->
# Simple loop
var $num = 1
@loop_start
if $num <= 10
print | $num
var $num = ($num+1)
goto @loop_start
endif
print <hr />
# Simple jump
if $num == 11
goto @next
endif
print This bit is skipped
return nothing
@next
print \$num=11<hr />
<!--/parser:xtscript-->
Show in textareaExample output
Reload | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
$num=11