PsychoPy version: 2023.2.3
I have an experiment that has the basic experiment loop, then an outer loop to designate the number of blocks, and a block that is outside of that double-loop.
I am trying to keep track of the number of trials that has occurred throughout the entire experiment and save it as part of the output. The current saving paradigm saves the block number and the trial number but enumerates from 0 at the start of the trial.
I have tried (via inserting code snippets) to create an object at the start of the experiment TrialNumber = 0
Then during the experiment routine, a code snippet that says
exp.addData('Trial_Number',TrialNumber)
Doing this told me that “exp” is not defined.
I then changed exp to the actual experiment name, but was told that TrialNumber is not defined.
Am I implemented the exp.addData code incorrectly?
Issac