Providing Feedback for every trial in a Study Loop

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10):
PsychoPy version (e.g. 2022/2.5):
Standard Standalone? (y)
What are you trying to achieve?:
I’m very new to this so sorry if my question is pretty dumb. I’m trying to provide feedback to the participants in every trial in a specific loop. The correct answer is saved in the colum of a excel sheet with also contains the stimulus files (pictures). In the component of the keyboard response i saved the correct answer with $colum for correct answers. When i now try to incorperate the stadard code example from the PsychoPy tutorial I only get the “Doh!” message which means i have to update msg.

Text snippet i used
`msg=‘doh!’#if this comes up we forgot to update the msg!
if not key_resp_2.keys :
msg=“Failed to respond”
elif resp.corr_2:#stored on last run routine
msg=“Correct! RT=%.3f” %(resp.rt)
else:
msg=“Oops! That was wrong”

note: my keyresponse is called key_resp_2 so i tweaked the code a little bit.`

Hello,

put your feedback in an extra routine following the presentation of your image and response. I assume that is code and text_2

BTW, use names which convey some meaning such as textFeedback. This simplifies debugging a lot in the long run.

Best wishes Jens