Issue with giving feedback-first correct feedback marked wrong

URL of experiment:

Description of the problem:
I used the following code to set up a feedback routine for one of my task.

The task consists of many trials and I realized that it appears that for the first accurate keypress, the message displayed always appears to be “Oops, that’s wrong!” and I don’t know how to fix it. Additionally, it appears that after an inaccurate response, once I get back to the accurate response, the problem will appear again.

I checked my excel file when I ran locally, it appears that the key response was marked as correct but the message being shown claims that it was wrong. I am not sure what I am doing wrong here.

Any suggestion?

1 Like

Where is this code in relation to the keyboard and the text component?

Screen Shot 2020-06-28 at 1.26.04 PM


I set up my routine such that the DC_T routine contains the keyboard component, followed by a timed feedback component with the text. The test component is set up to show $msg.

I also put the code in the begin routine section. with the msg = ‘’ in the begin experiment section

Begin Routine of DC_fb ?

Is it above the text component?

The code component is below right now, should i move it to the top?

Yes – at the moment it’s running after msg is assigned

1 Like

It worked! I did not know that the presentation order matters! Thank you so much for your help!