PennController for IBEX › Forums › Support › Cannot getVal correctly › Reply To: Cannot getVal correctly
March 3, 2021 at 12:21 pm
#6690
Jeremy
Keymaster
Hi Rick,
As far as I can tell, you don’t need a Var element to do what you’re after:
subjID = String.fromCharCode(65+Math.floor(Math.random() * 26)) + Math.floor((Math.random() * 10000) + 1) Sequence ("experiment","bye") Header( // ... ) .log("ParticipantID", subjID) // ... experiment newTrial("bye", defaultText .center() .print() , newText("<p>Thank you for doing this study!!!</p>") , newText("Your participant id number is:") , newText(subjID) , newButton("void") .wait() ) .setOption("countsForProgressBar" , false)
What you report is a known bug, I’ll work on fixing it for the next release (or the one after that)
Jeremy