Cannot read property of 'split' undefined

Description of the problem: I’m working on a self-paced reading task, which runs locally but does not run when I try to pilot it on Pavlovia I get the following error image

I adapted the code from the self-paced reading demo and have the following in the builder. srpsent is a column in the excel sheet linked to the trials and doesn’t give me the undefined error locally.

What am I doing wrong?

You seem to be splitting srpsent before you set it.

I’m confused about the logic here?

Is words and array created by splitting a space delimited string or is srpsent one of the items in the words array?

srpsent is a column in my excel sheet with all the stimuli where the sentences are. Each sentence varies in length, so I want to use the “space” to split the sentence to only present one word at a time. I’m not sure how I need to define it since when I run it locally it seems to automatically recognize that srpsent is a column in the excel sheet linked to the trial loop.

If it’s a column in the Excel file you shouldn’t also define it in the code