Description of the problem:
In my experiment, participants will be presented an image. If that image has a green or red frame then participants should press ‘s’ but if that image has a grey frame then they should press ’ l’.
In my data file,
I must see ‘1 ’ if correct answer is s and participant’ s response is s
’ 1’ if correct answer is l and participant’s response is l
But I must see ‘0’ if correct answer is s but participant’s response is l
‘0’ if correct answer is l but participant’ s response is s
I added a code on Each Frame tab. Even though it works locally, it doesn’t work on Pavlovia. What can I do to solve this problem?
why do you code this yourself? You could store the correct key in an Excel-file, check the key-property Store correct of your key-component and specify the Excel column-name that contains the correct key.
BTW, the code should work if you put it in the End routine tab as suggested by @wakecarter
as shown in the picture above. Check Store correct and insert the proper column header of your Excelfile. You don’t have to name it correct as I did in this example. Choose a name that suits you.