Problems with the errormessage


Author
Message
doh
doh
Respected Member (349 reputation)Respected Member (349 reputation)Respected Member (349 reputation)Respected Member (349 reputation)Respected Member (349 reputation)Respected Member (349 reputation)Respected Member (349 reputation)Respected Member (349 reputation)Respected Member (349 reputation)
Group: Forum Members
Posts: 9, Visits: 73
I have a problem with the errormessage.
When I type in
/ errormessage=true(errortext, 500) the text appears when i type in the correct response. However, when i type in
/ errormessage=false nothing happens when i press the incorrect key. What am I doing wrong?




<trial AntiSaccade_R_right1>
/ ontrialbegin = [
    values.targetLocation = "right";
    values.target = "R";
    values.fixationDuration = list.fixationDurations.nextvalue;
    trial.AntiSaccade_R_right1.insertstimulustime(text.rightequation, values.fixationDuration);
    trial.AntiSaccade_R_right1.insertstimulustime(shape.leftflashEraser, (values.fixationDuration + values.flashDuration));
    trial.AntiSaccade_R_right1.insertstimulustime(text.R_right, (values.fixationDuration + values.flashDuration));    
    trial.AntiSaccade_R_right1.insertstimulustime(text.HMask2_right, (values.fixationDuration + values.flashDuration + values.flashDuration));
    trial.AntiSaccade_R_right1.insertstimulustime(text.rightMask, (values.fixationDuration + values.flashDuration + + values.flashDuration + values.targetDuration));        
]
/ stimulustimes = [0 = fixationstim]
/ beginresponsetime = values.fixationDuration + values.flashDuration
/ validresponse = (1,2,3,4)
/ correctresponse = (3)
/ responseinterrupt = immediate
/ ontrialend = [trial.AntiSaccade_R_right1.resetstimulusframes();
    values.stim = text.R_right.currentitem;
    list.AntiSaccade_Accuracy.insertitem(trial.AntiSaccade_R_right1.correct, 1);
    if (trial.AntiSaccade_R_right1.correct) {
        list.AntiSaccade_correctRT.insertitem(trial.AntiSaccade_R_right1.latency, 1)
    };]
/ recorddata = true
/ errormessage=true(errortext, 500)
/ posttrialpause = values.iti
</trial>

Dave
Dave
Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)
Group: Administrators
Posts: 10K, Visits: 62K
doh - 11/16/2020
I have a problem with the errormessage.
When I type in
/ errormessage=true(errortext, 500) the text appears when i type in the correct response. However, when i type in
/ errormessage=false nothing happens when i press the incorrect key. What am I doing wrong?




<trial AntiSaccade_R_right1>
/ ontrialbegin = [
    values.targetLocation = "right";
    values.target = "R";
    values.fixationDuration = list.fixationDurations.nextvalue;
    trial.AntiSaccade_R_right1.insertstimulustime(text.rightequation, values.fixationDuration);
    trial.AntiSaccade_R_right1.insertstimulustime(shape.leftflashEraser, (values.fixationDuration + values.flashDuration));
    trial.AntiSaccade_R_right1.insertstimulustime(text.R_right, (values.fixationDuration + values.flashDuration));    
    trial.AntiSaccade_R_right1.insertstimulustime(text.HMask2_right, (values.fixationDuration + values.flashDuration + values.flashDuration));
    trial.AntiSaccade_R_right1.insertstimulustime(text.rightMask, (values.fixationDuration + values.flashDuration + + values.flashDuration + values.targetDuration));        
]
/ stimulustimes = [0 = fixationstim]
/ beginresponsetime = values.fixationDuration + values.flashDuration
/ validresponse = (1,2,3,4)
/ correctresponse = (3)
/ responseinterrupt = immediate
/ ontrialend = [trial.AntiSaccade_R_right1.resetstimulusframes();
    values.stim = text.R_right.currentitem;
    list.AntiSaccade_Accuracy.insertitem(trial.AntiSaccade_R_right1.correct, 1);
    if (trial.AntiSaccade_R_right1.correct) {
        list.AntiSaccade_correctRT.insertitem(trial.AntiSaccade_R_right1.latency, 1)
    };]
/ recorddata = true
/ errormessage=true(errortext, 500)
/ posttrialpause = values.iti
</trial>

validresponse = (1,2,3,4)
/ correctresponse = (3)

Those are keyboard scan codes, not character values. Scancode 1 is the Escape key, scancode 2 is the 1-key at the top of your keyboard, scancode 3 is the 2-key, scancode 4 is the 3-key.  The correct response, as defined in your trial, is a press on the 2-key.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search