No variables being defined at onset (ReferenceError

URL of experiment: Sign in · GitLab

Description of the problem: My experiment currently runs perfectly offline, but when online I keep getting errors that my variables aren’t defined. I defined individual variables at the beginning of the JS code just to make sure that was the actual problem, but I know that defining each variable individually is not a solution to the underlying problem. I’m new at JS, so any advice would be greatly appreciated.

If the first time a variable is used is within a clause (e.g. if ) then you need to define it first outside a clause. I usually do this is Begin Experiment. Use Python auto translate not JS directly. For example, if x is not defined put x = 0.

Hi, I think my issue is more with variables that I believe are supposed to be autogenerate but are not.

For example: * ReferenceError: frameDur is not defined

How do I deal with this?

There is probably something else stopping your JS code compiling correctly

Have a look at some suggestions here: