I keep saying stop trying to fix the var statements. If the rest of your experiment is right then those will be added automatically. The issue with the var statements is caused by an issue with your study.
You need to find the component that’s breaking the code in the first place. When you remove things what causes the var lines to come back?
In @fetch 's case the these blank audio onsets are certainly an issue. If you want audio to start based on a certain condition then set that in the dialog box, rather than setting onset to be blank you need to set it to be start on condition and then set that conditional in the dialog box. Maybe you create a variable like startMySound
and set that to True when you want the sound to play, but you can’t just leave the box blank. Doing that caused PsychoPy to write the code
if (() && star_sound.status === PsychoJS.Status.NOT_STARTED)
which doesn’t make sense.
So it would be great if you could spend some time working out which parts of your code are breaking the compiling step and letting us know. Then we can start inserting things to alert users before that goes wrong like, “The onset of an object can’t be blank”
cheers,
Jon