Pause code is not working and no error message displayed

Hi everyone,
We have a JS code which enables a pause to appear after every 20 trials:

if (trials.thisN !== 20){
continueRoutine = false;
}

This code is working fine. But when we make slight changes to other routines in the experiment, the pause is not showing and no error message is displayed. It is not clear why changing routines which are not related to the routine with the code disables the code. And moreover, no error message is displayed. The experiment just goes on, but the pause message is not displayed.

.thisN doesn’t work online as of 2020.2 so updating an experiment from 2020.1 to 2020.2 will break references to thisN.

Several of our dissertation students are writing up data with blocks of identical trials because I didn’t manage to fix this in one experiment I reused from August…and none of them or their participants noticed and mentioned it to me.

Thanks a lot!

Is there any other way to code the pause without .thisN?

Thank you very much!