I am using code to stop a routine after a number of trials have been completed.
I have tried all of the following methods
if trials.thisN == 5:
continueRoutine = False
I have also tried adding a counter and having counter += 1 in end routine and then
if trials.thisN == counter:
continueRoutine = False
I’m sure I’ve used something similar in the past, but I do recall thisN didn’t work for a while and was wondering if there was an issue or if I have forgotten something?
I did also try to use print(counter) and print(trials.thisN) but the runner is clogged up with other things I’m not really interested in currently.
I managed to fix it. They were using trials_DMM, changing this to trials_4 instead has fixed the issue. It seems that trials.thisN doesn’t like anything other than numbers after “trials”