Stuck on initialising experiment when running through Pavlovia

URL of experiment: Constellations_NAI2022_ENG [PsychoPy]

Description of the problem:
Hello,
I’ve run into a problem with putting my experiment online through pavlovia. The experiment always gets stuck on “initialising experiment”. The experiment works fine offline though. I think that the error message for the problem is “Alert 4210:JavaScript Syntax Error in ‘Begin JS Experiment’ tab. See ‘Line 2: Unexpected token ILLEGAL’ in the ‘Begin JS Experiment’ tab.
For further info see 4210: Probable syntax error detected in your JavaScript code — PsychoPy v2022.2.4
I’ve searched around and come to a conclusion that the problem could be caused by some incorrect imports in the JS file. Sadly I’ve tried everything that has been recommended by people on the web but with no luck.
These are the only imports in my JS file:
image

Any help would be largely appreciated, I’ve tried everything and the deadline is coming up fast. I can also share the file to git privately if more info is needed or someone wants to help :slight_smile:

Thanks again!

Hi, based on the error shown in the console, it seems that your syntax error is coming from this line

Maybe instead of converting the number 1 directly into string, you can turn that into a variable of its own and then convert it into string. So something like this

Thank you very much for the fast response, that fixed the issue indeed!
Unfortunately a new issue has arisen.
image
Seems weird since my experiment contains multiple loop, and seems to be defined?:
image

Do you mind sharing your task with me so that I can take a closer look? It’s currently saying you don’t have enough credits to run the task

Sure, I will PM you the git link if that works with you?