I am unable to push changes I made to Pavlovia, for some reason. I checked my JS code components and they look fine. Any ideas on this will be much appreciated
Tell me about condition?
Are you possibly using it for more than one thing?
Set up the function in Before Experiment or format it as per my crib sheet.
I’d recommend using Auto code components and coding in Python.
Your function has 1 and 5 instead of variable names such as min and maxplusone.
I assume you got variant is not defined
No, I got the condition is not defined:

Define the function in Before Experiment
Define condition in Begin Experiment
If you try changing condition to variant, in needs to be changed in both locations.
I would recommend defining it in Python as well as JS.
I tried to do that - I changed everything to varient1. I also mentioned that I forgot the “;” in the line “condition = randint(1,4)”
I also now use A,B,C,D instead of 1,2,3,4
Before experiment tab looks like this:
Begin experiment tab:
This option worked here:
But for some reason I still get the same error that varient1 is not defined…





