Millisecond Forums

/errormessage issues

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

By charlottebooth - 9/30/2014

Hi everyone,

I am creating a task where words are shown and Pps have to indicate whether the word describes them by pressing 'Y' or 'N'. I'm just struggling with the error message. I want a text element to appear if they click any key that isn't a 'Y' or a 'N' to remind them of the task instructions basically.

Here is this script at the moment:
<trial positive>
/stimulustimes = [150=positive; 2500=describes]
/inputdevice = keyboard
/validresponse = ("Y", "N")
/errormessage = true(errortext, 1000)
/pretrialpause = 500
</trial>

However this script causes the errormessage to appear only when a valid response was made, which is exactly the opposite of what I want it to do.

Any hep would be much appreciated!

Thanks,

Charlottte
By Dave - 9/30/2014

/ validresponse determines *which responses are allowed at all* in a given trial. If you wanted to allow participants to press any key, you would have to define

/ validresponse = (anyresponse)
/ correctresponse = ("Y", "N")
/ response = correct
By charlottebooth - 10/1/2014

That's great! Only problem now is that my error message doesn't appear when they use a valid but not correct response! Any ideas?
By Dave - 10/1/2014

Grrr, looks like there's an issue when specifying the /response attribute at the <trial>-level. Workaround is to do it at the <block>-level instead:

<block myblock>
/ trials = [1-4=mytrial]
/ response = correct
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (anyresponse)
/ correctresponse = ("Y", "N")
/ errormessage = true(x,500)
</trial>

<text mytext>
/ items = ("Stimulus")
</text>

<text x>
/ items = ("X")
/ color = (red)
/ position = (50%, 60%)
</text>