Hello, I can’t seem to figure out what’s going on here. I have 3 inner loops nested within an outer loop, and I want to make it so that if a condition is met in the 2nd inner loop, then the outer loop starts over.
Right now, in Begin Routine, I have : ncode2 = 0;
and in End Routine, I have :
if key_resp_5.keys == '1': ncode2 = neighbor1code if key_resp_5.keys == '2': ncode2 = neighbor2code if key_resp_5.keys == '3': ncode2 = neighbor3code if not key_resp_5.keys: continueRoutine = False trials.finished = True if ncode2 = '' or '0': continueRoutine = False trials.finished = True
I think the trials.finished is terminating the whole experiment? And, if I take trials.finished = True out, then I get the following error: object0.xlsx not found. The 3rd inner loop’s conditions file is $‘object’+str(ncode2)+’.xlsx’, so it seems like the outer loop is trying to continue on to the 3rd inner loop.
The object1.xlsx and object2.xlsx files are examples of the inner loop conditions files. In object1.xlsx there are 3 “neighbors”, and if this is shown in the second inner loop, participants will choose one of the neighbors and then advance to the third inner loop. But in object2.xlsx there is a “terminating” object, where they make no response but it is supposed to trigger the onset of a new trial, ie restart the outer loop.
Thank you for any help or feedback!!
object1.xlsx (8.7 KB)