Global var logged “undefined”

PennController for IBEX Forums Support Global var logged “undefined”

Tagged: , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #10891

    Hi Jeremy,

    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).

    Here is a link to the demo: (The logged lines are 274 and 276).

    Thanks so much!



    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?


Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.