I have a problem understanding coding collecting points.
In another program for experiments, my code works fine, but here I don’t know how to write them right.
Here is the code that works in Opensesame:
self.get('gleich'), self.get('response') if (var.gleich == 1) and (var.response == 'space') or (var.gleich == 0) and (var.response == 'None'): correct = 1 else: correct = 0 response = var.response var.response_key = response var.response_correct = correct
One point is to be awarded in each case if the number in the table of the respective trial is 1 and then the Space key is pressed or if the number is 0 and the Space key is not pressed.
In Psychopy I have tried various things, but somehow I lack the understanding of how to access the variable from the excel sheet. I made it so far that a new variable is created in the datasheet, but it is always 0.
Attached is the simple structure of the experiment as a screenshot.
It would be nice if anyone could give me some clues.