Sorry about the many questions. I ran into an issue trying to modify the standard AMP script. Specifically, after each normal trial I'm trying to include an additional trial on which the participant can indicate whether they think their response to the target was influenced by the prime. The code for the influence trial that I'm trying to add is attached.
The idea is that no matter what, the trial should take 2,500 ms to complete. First there is a blank screen for 200 ms and then there is a 2,300 ms window during which the participant can enter their response by hitting space.
If they hit space (line 35), we set the score to 1, remove the input, hide the stimulus, and log the trial. If they don't hit space and the trial isn't logged yet, we set the score to 0 and log the trial (lines 48–49). The latter is supposed to get triggered only when we get to the end of the trial (line 78).
But somehow my logic must be off. If I hit space during the trial, I get an error saying that the PI server doesn't accept multiple logs per trial. If I comment out line 54, I don't get the error. But the trial doesn't get logged either unless the space bar is pressed.
Can someone please look at my code and help me figure out where my logic with the conditionals is off?
Thanks so much!