I built a dot-probe task using one of the downloadable templates, but there seems to be a bug with my implemented errormessage attribute. Every trial, correct or incorrect, is giving me the errormessage. I have even outputted the iscorrectresponse criteria and matched it all up to ensure that I was giving a correct response, yet it still goes to the error message. Here is a snippet of the code:
<text Error>
/items = ("Error Triggered Delay
Get Ready -- 3 Seconds")
/position = (50%,50%)
</text>
<trial pfixation>
/ ontrialbegin = [values.probe_y = values.target_y + list.multiplicator.nextvalue * list.randomnumbers.nextvalue;
if (list.pcueprobeposition.nextvalue == 1) {
values.redsquare_x = values.target_left_x;
values.probe_x = values.target_left_x + list.multiplicator.nextvalue * list.randomnumbers.nextvalue;
values.cueprobe_x = values.target_left_x}
else {values.redsquare_x = values.target_right_x;
values.probe_x = values.target_right_x + list.multiplicator.nextvalue * list.randomnumbers.nextvalue;
values.cueprobe_x = values.target_right_x}]
/ ontrialbegin = [values.probetype = list.pcueprobetype.nextvalue]
/ stimulustimes = [0 = fixation_left, fixation_right, redsquare; 1000 = probe]
/ timeout = values.fixationduration
/ branch = [values.selector=list.pdisplay.nextvalue; trial.pDisplay]
/ ontrialend = [values.cueprobetype = values.probetype]
/ ontrialend = [if(list.preferenceposition.nextvalue == 1) {
values.reference_x = values.target_left_x;
values.neutral_x = values.target_right_x;}
else { values.reference_x = values.target_right_x;
values.neutral_x = values.target_left_x;}]
/ ontrialend = [if (list.ptargetduration.nextvalue == 1) values.targetduration = 500
else values.targetduration = 1000]
/ recorddata = false
</trial>
<trial pDisplay>
/stimulustimes = [1=PReference, PAbstract]
/branch = [trial.ptargetProbe]
/timeout = values.targetduration
/recorddata = false
<trial ptargetProbe>
/ontrialbegin = [values.probetype = list.ptargetprobetype.nextvalue]
/ontrialbegin = [if(list.ptargetprobeposition.nextvalue == 1) values.probe_x = values.target_left_x
else values.probe_x = values.target_right_x]
/ontrialbegin = [values.targetprobetype = values.probetype]
/ontrialbegin = [values.targetprobe_x = values.probe_x]
/stimulusframes = [1 = probe, probeValues]
/ inputdevice = keyboard
/isvalidresponse = [trial.ptargetProbe.response == values.responsekey_left || trial.ptargetProbe.response == values.responsekey_right]
/monkeyresponse = (18,23)
/iscorrectresponse = [(values.cueprobetype == values.targetprobetype && trial.ptargetprobe == values.responsekey_left) ||
(values.cueprobetype != values.targetprobetype && trial.ptargetprobe == values.responsekey_right) ]
/errormessage = true(Error,3000)
/recorddata = false
</trial>
<text probeValues>
/items = ("<%values.cueprobetype%> <%values.targetprobetype%> <%values.cueprobetype == values.targetprobetype%>" )
/position = (50%,50%)
</text>