I’m working on an experiment in builder to put online but Pavlovia does not like some of my codes. The error I get is this:
ReferenceError: len is not defined.
I’ve been using code to split up my sentences into separate words. The words appear one by one on the screen, then a picture appears, then a letter and participants have to answer ‘f’ or ‘j’. This can be at the end of the sentence or in the middle, which means I have two lists: SentenceBefore and SentenceAfter.
It looks like this:
In the beforeloop I have this code added in nReps$
In BeforeStimSentence I have this code in Begin Routine:
if BeforeLoop.thisN == 0: # only on the first iteration SentenceBefore_list = SentenceBefore.split() # this breaks your sentence's single string of characters into a list of individual # words, e.g. 'The quick brown fox.' becomes ['The', 'quick', 'brown', 'fox.']
and this in the text box in BeforeStimSentence:
Does anyone know what I can do to make Pavlovia happy? Or to get it running in another way online? I apologise if I missed some crucial information - as you can guess I have no experience with coding.
Thanks in advance!