Problem making a wrap around loop with modulo

You also had tried to change the variable of your for loop

This is not recommended and you should know what you are doing if you do it

Instead take a new variable (k2 or so) like in my example above

1 Like