Hi there. I am an undergraduate student new to psychopy. I’m designing a self-paced reading task, and I’d like to have the participants press the spacebar to bring up a next phrase.
So here is the code I wrote
//Clear the buffer
psychoJS.eventManager.clearEvents()
psychoJS.eventManager.clearKeys()
//Parse our stimulus
words = target.split(" ")
//Create individual word stimuli
sentPos = 0
stimulus = words[sentPos
//Create a clock
clock = new util.clock()
But I’m getting this error
NameError: name ‘stimulus’ is not defined
In the excel file I attached to the loop, there is a variable called target, and then there are 30 sentences below it.
What is wrong with that?
Thanks.