May not be a bug, but this seems quite strange to me. If you create a loop and you want to use the loop counter variable to index stuff, see MWE:
Program
Init Variables
Robot Program
Loop Loop_1<10
textmsg(Loop_1)
sync()
Then the Loop_1 variable is neither initialized nor incremented in the script file:
$ 1 "Robot Program"
$ 2 "Loop Loop_1<10"
while (Loop_1<10):
$ 3 "textmsg(Loop_1)"
textmsg(Loop_1)
$ 4 "sync()"
sync()
end
As if you created the loop to run X amount of times:
Program
Robot Program
Loop 10 times
textmsg(Loop_1)
sync()
Produces the following script code:
$ 1 "Robot Program"
$ 2 "Loop 10 times"
Loop_1 = 0
while (Loop_1 < 10):
$ 3 "textmsg(Loop_1)"
textmsg(Loop_1)
$ 4 "sync()"
sync()
Loop_1 = Loop_1 + 1
end
You can force the Loop counter to be initialised in InitVariables but this just presents the user with an infinite loop.