I’m trying to add a rest break. It works fine on my local computer, but my experiment breaks on Pavlovia as I get to the rest break so I thought I’d check what I wrote. I put the code component in the rest break routine, set to run on each frame.
I should specify, I get a red box error message at the point where the rest break would appear, but it disappears too quickly to see what the error message is or I’d take a screengrab.
OK I did a wee bit more digging. First, I recorded the experiment and then rewatched which allowed me to pause and see the error - turns out it was because the images hadn’t uploaded properly to the html folder so I fixed this. Now the experiment works, but the rest break never shows. I added this code to my rest break:
console.log(trials.thisTrialN);
When I look at the console (in firefox, by going to Tools>Web developer>Console), it’s showing up as 0 each time, so somehow, the trials are not being counted which is why the rest break never runs. Any idea how to fix this?
Unfortunately neither of these options didn’t work on Pavlovia although they did on Psychopy local - I tried adding an iteration (+1) at the beginning of each routine, as well as on each frame. I’m so puzzled why the trial number doesn’t seem to increment.