i'm stuck on implementing a counter variable in my experiment. I want to count correct feedback in a probabilistic choice task to provide money based on the amount of positive feedback received. Therefore, i have a trial loop+sequence in which a choice display is shown, and within, another loop and sequence for the feedback screen.
At the beginning of the experiment, i set the counter to value 0.
Within in feedback sequence i then wrote a script that should update the counter whenever another variable in the choice phase has the value "green", which is based on the exp.response variable:
if exp.feedbackvariable == 'green':
exp.counter += 1
During the experiment i can see my counter variable in the inspector, however, it remains 0 regardless of correct/incorrect feedback.
I'm thankful for any kinds of suggestions.
Btw: i'm using win10, OpenSesame 3.2.1 with Python 2.7.13
Thanks in advance,