For Looping doesn't change variables

Hello. I’m making a script . And I’m having issues with the Loop. On pastebin it’s index(0…0), i’ve tried countless combinations and whatever i do i cannot make the loop change variables.

One of the combinations i tried was (int i=0; i<=3; i++) but this made the loop run 3 times with one variable and then start over from the very beginning with the next variable.

Any Help is appreciated

Hi Todor


for (def index : (1..3)) {

index should go from 1 through to 3 (i.e. 1, 2, 3)