Millisecond Forums

problem with correct output

https://forums.millisecond.com/Topic17198.aspx

By charlottebooth - 9/23/2015

Me again!
For some reason Inquisit won't recognise any response as correct. I used a previous example you gave - is something wrong with the /iscorrectresponse?
Originally I stored the two possible targets within the /items <picture> but that didn't work - so I created a list of <item>s which is what 1 and 2 are referring to. This still doesn't work and I have been playing around with " " and other parts of the syntax - is there something obvious I'm missing?


<trial old>
/stimulustimes = [1=cross; 750=blank; 1000=targets,distractor1,distractor2,distractor3,distractor4,distractor5, distractor6, distractor7, distractor8, distractor9, distractor10, distractor11]
/iscorrectresponse = [(item.targets=="2"&&trial.old.response==51) || (item.targets=="1"&&trial.old.response==52)]
/validresponse = (51, 52)
/ ontrialend = [reset(counter.distractorpositions)]
/ ontrialbegin = [values.targetpos=counter.targetspositions.selectedvalue; values.targetx=counter.targetsxpos.selectedvalue; values.targety=counter.targetsypos.selectedvalue;
                  values.distractor1pos=counter.distractorpositions.selectedvalue; values.distractor1x=counter.distractorxpos.selectedvalue; values.distractor1y=counter.distractorypos.selectedvalue;
                  values.distractor2pos=counter.distractorpositions.selectedvalue; values.distractor2x=counter.distractorxpos.selectedvalue; values.distractor2y=counter.distractorypos.selectedvalue;
                  values.distractor3pos=counter.distractorpositions.selectedvalue; values.distractor3x=counter.distractorxpos.selectedvalue; values.distractor3y=counter.distractorypos.selectedvalue;
                  values.distractor4pos=counter.distractorpositions.selectedvalue; values.distractor4x=counter.distractorxpos.selectedvalue; values.distractor4y=counter.distractorypos.selectedvalue;
                  values.distractor5pos=counter.distractorpositions.selectedvalue; values.distractor5x=counter.distractorxpos.selectedvalue; values.distractor5y=counter.distractorypos.selectedvalue;
                  values.distractor6pos=counter.distractorpositions.selectedvalue; values.distractor6x=counter.distractorxpos.selectedvalue; values.distractor6y=counter.distractorypos.selectedvalue;
                  values.distractor7pos=counter.distractorpositions.selectedvalue; values.distractor7x=counter.distractorxpos.selectedvalue; values.distractor7y=counter.distractorypos.selectedvalue;
                  values.distractor8pos=counter.distractorpositions.selectedvalue; values.distractor8x=counter.distractorxpos.selectedvalue; values.distractor8y=counter.distractorypos.selectedvalue;
                  values.distractor9pos=counter.distractorpositions.selectedvalue; values.distractor9x=counter.distractorxpos.selectedvalue; values.distractor9y=counter.distractorypos.selectedvalue;
                  values.distractor10pos=counter.distractorpositions.selectedvalue; values.distractor10x=counter.distractorxpos.selectedvalue; values.distractor10y=counter.distractorypos.selectedvalue;
                  values.distractor11pos=counter.distractorpositions.selectedvalue; values.distractor11x=counter.distractorxpos.selectedvalue; values.distractor11y=counter.distractorypos.selectedvalue]
</trial>
By Dave - 9/23/2015

Yes, your  /iscorrectresponse attribute does not make sense and can never return "true" (i.e. correct).

/iscorrectresponse = [(item.targets=="2"&&trial.old.response==51) || (item.targets=="1"&&trial.old.response==52)]

item.targets simply doesn't mean anything and as such can never equal either 2 or 1.

You'll probably want something along the lines of

/ iscorrectresponse = [(picture.targets.currentitemnumber==2 && trial.old.response==51) || ...]