Out of curiosity, what kind of error are you getting? My 3DS isn't on hand but I plan to experiment when I get the chance.
Store label in array?
Root / Programming Questions / [.]
VakoreCreated:
I forgot if it's possible, but are you by chance doing a string array? In theory, just doing below would work just fine.
var array$[4] array$[0]="@test1" array$[1]="@test2" gosub array$[0] print "EOF" @test2 print "world" return @test1 print "Hello!"; gosub array$[1] returnAlternatively, you could make it one step more complicated by defining a string variable that takes on the array variable's contents dependent on another variable. Like so.
var array$[4] var CO var RE$ array$[0]="@test1" array$[1]="@test2" while true RE$=array$[CO] gosub RE$ wend @test2 print "world" CO = 0 return @test1 print "Hello!"; CO = 1 return
Glad we could help!