Keeping a running count of score and skip the loop conditionally

I guess that error happens because you use the same routines in the second loop, which has a different name (trials instead of trials_2). You need a way to refer to the correct name of the loop. This problem has a workaround here:

https://groups.google.com/forum/#!topic/psychopy-users/gbnt6UxdLmg

But I think in the mean time Jon has added a way to refer to the enclosing loop generically rather than by its specific name but for the life of me, I can’t remember how that is done. perhaps someone else can pipe in here.

It is very easy to terminate a loop.

e.g. put something like this at the appropriate point:

if RunScore == 0:
    name_of_loop.finished = True

But once again, you’ll need to find a way to to refer to the enclosing loop other than by using its name directly.