Probably a scope issue. Remove the word “var” from before each variable so they will be declared as implicit globals See here: Variable not defined
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Begin routine from the builder doesn't work online | 13 | 2378 | July 27, 2020 | |
| Variable not defined | 4 | 3954 | March 31, 2020 | |
| Pavlovia javascript isn't declaring my variables from Psychopy .py code | 9 | 2218 | April 14, 2020 | |
| Problem updating a component parameter that has been imported from trial spreadsheet | 2 | 485 | April 27, 2020 | |
| ReferenceError for variable that I created in code component (runs locally in Builder) | 2 | 502 | January 12, 2021 |