RangeError: Invalid array length

SOLUTION!!!
@laura_prosser we were nearly there…after reading this thread (ReferenceError: slice is not defined - #8 by huppfi), I tried this:

Psychopy code:

if NumberBlocks < 1:
WhichRows =“0:11”
NoLoopsAdapters = 27

Auto JS:

if ((NumberBlocks < 1)) {
WhichRows = “0:11”;
NoLoopsAdapters = 27;

This works in both psyhcopy and pavlovia! So the crucial thing is the quotation marks (note I dont advise copy pasting those quote marks - actually type them yourself otherwise it doesnt work). Thanks for pushing me in the correct direction, Laura :smiley:

1 Like