Reply To: Keeping track of participant accuracy

PennController for IBEX Forums Support Keeping track of participant accuracy Reply To: Keeping track of participant accuracy

#11160
k.stone
Participant

Hi Jeremy & co,

I’m probably doing something very silly – but I’ve been using the code under miriam’s comment to store accurate responses. But I can’t seem to create the global variable correctly. I’ve tried:

newTrial( “intro” ,
newVar(“AccSubj”, 0).global(), // I don’t need a list, just a counter
newText(“debugInit”, “AccSubj = ” + getVar(“AccSubj”).value).print(),
newTimer(1000).start().wait()

)

–> result of debugInit is 0 as expected, but as soon as I start a newTrial (e.g., for an experiment), AccSubj is undefined. For example:

newTrial( “debug1” ,
newText(“debug11”, “AccSubj = ” + getVar(“AccSubj”).value).print(),
newTimer(1000).start().wait()

)

–> result “undefined”

Any tips?

Best,
Kate