I’m using a couple of global variables to keep track of how many tries it takes for someone to have the correct typing input. I’m using a template for the exposure trials, and the logging of these variables (outside the newTrial()) is variably reliable. Sometimes, it does log the correct value, but other times, it gets logged as “undefined” or “NaN.”
Can you help me figure out how to get the variables correctly logged?
To debug, I have the variable values printed as Text objects, and those seem to be behaving normally, as does the final summary (the summary is displayed in the “break” trial in the Sequence).
Unfortunately the Modules folder of the project you shared currently lacks the file PennController.js. There was, however, a bug with global Var elements in a version of PennController 2.1 that was present in the Empty project for a time. Could you try uploading the latest version of PennController 2.1 to your project and see if the problem persists?