I haven’t studied this post in detail yet but two things occur to me.
-
You can’t change the nReps of a loop once it has started. Set the nReps to a large number and then end the loop with code when you’ve finished with it.
-
loopName.finished breaks the loop at the end of the current iteration, not the end of the current routine. To skip routines put continueRoutine =False in Begin Routine.