Hi Thomas,
Thank you again for your help!
Ok, I will work on converting those!
After building up the loop on a separate file, I redid the code and simplified it a ton, following the advice from this thread: Exit a loop on pavlovia - #34 by dvbridges. It now reads
stimArray = […Array(17).keys()];
util.shuffle(stimArray)
in begin experiment and
currentArray = stimArray.pop()
in begin routine. This is because I realized that I didn’t want a loop since I just needed the trial to run once and move to the next file.
However, I am still getting the invalid array length error, but now with a different .csv file each time, even though they all have same amount of rows as the other csv files and I didn’t change any of the files.
I apologize, I’m not very familiar at all with Javascript. What would be the best way to use the console.log function in this case? Would it be console.log(currentArray)?
Thank you again!