If you nest loops and use the same loopindex, even if it is in a seperate function, it does not work correctly. In the example below, replacing the second "a" with a "c" causes it to loop four times rather than eight. This can be problematical if writing effective code functions in C2 - discovered this when I had nested loops with "xi", but the two loops with index "xi" were in completely different files.
Attach a Capx
Description of Capx
Three nested loops with duplicate loopindexes (loopindices ?)
Steps to Reproduce Bug
- Step 1 : Run the above code
(from Browser log window)
Should be 8 outputs not 4. Or should warn about reusage. I'm hazarding a guess that loopindex is stored in a java hash in the runtime ? Maybe the loopindex value could be set to nil when the loop exits and if there is a loopindex already present when a loop is started causes a RTX ?
Operating System and Service Pack
Construct 2 Version ID
v206 64 bit