KatrinaMcDonough
|
|
Group: Forum Members
Posts: 45,
Visits: 235
|
+x+x+x+xHello, I am trying to program a conditional statement for the correct response value, so that participants with odd and even subject numbers have different tasks - either press the spacebar or don't respond. However, the I get a message saying "'noresponse' Expression contains an unknown element or property name." It works when I select a different response (i.e. changing "noresponse" to just a different key). <shape redcircle> / shape = circle / color = red / size = (20%, 20%) / position = (50%, 50%) </shape> <shape bluecircle> / shape = circle / color = blue / size = (20%, 20%) / position = (50%, 50%) </shape> <text errormessage> / items = ("incorrect") </text> <text correctmessage> / items = ("correct") </text> <expressions> /CorrectCounterbalanced1 = if ( floor(mod(script.subjectid, 2)) != 0 ) {57;} else {noresponse;} </expressions> <trial circles> / stimulusframes = [1 = redcircle] / inputdevice = keyboard / validresponse = (57, noresponse) / correctresponse = (expressions.CorrectCounterbalanced1) / trialduration = 2000 / errormessage = true(errormessage, 2000) / correctmessage = true(correctmessage, 2000) </trial> <block block> / trials = [1-5=circles] </block> 0 is the proper indicator for no response. I.e. <expressions> /CorrectCounterbalanced1 = if ( floor(mod(script.subjectid, 2)) != 0 ) {57;} else {0;} </expressions> Thank you. I have tried this, but it still says the response (or lack of in this case) is incorrect. i.e. when I am subject 2 and I do not respond, it shows the error message. You need to use /iscorrectresponse in your <trial>, not /correctresponse: <trial circles> / stimulusframes = [1 = redcircle] / inputdevice = keyboard / validresponse = (57, 0) / iscorrectresponse = [trial.circles.response == expressions.CorrectCounterbalanced1]/ trialduration = 2000 / errormessage = true(errormessage, 2000) / correctmessage = true(correctmessage, 2000) </trial> Problem solved! Thanks!
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+xHello, I am trying to program a conditional statement for the correct response value, so that participants with odd and even subject numbers have different tasks - either press the spacebar or don't respond. However, the I get a message saying "'noresponse' Expression contains an unknown element or property name." It works when I select a different response (i.e. changing "noresponse" to just a different key). <shape redcircle> / shape = circle / color = red / size = (20%, 20%) / position = (50%, 50%) </shape> <shape bluecircle> / shape = circle / color = blue / size = (20%, 20%) / position = (50%, 50%) </shape> <text errormessage> / items = ("incorrect") </text> <text correctmessage> / items = ("correct") </text> <expressions> /CorrectCounterbalanced1 = if ( floor(mod(script.subjectid, 2)) != 0 ) {57;} else {noresponse;} </expressions> <trial circles> / stimulusframes = [1 = redcircle] / inputdevice = keyboard / validresponse = (57, noresponse) / correctresponse = (expressions.CorrectCounterbalanced1) / trialduration = 2000 / errormessage = true(errormessage, 2000) / correctmessage = true(correctmessage, 2000) </trial> <block block> / trials = [1-5=circles] </block> 0 is the proper indicator for no response. I.e. <expressions> /CorrectCounterbalanced1 = if ( floor(mod(script.subjectid, 2)) != 0 ) {57;} else {0;} </expressions> Thank you. I have tried this, but it still says the response (or lack of in this case) is incorrect. i.e. when I am subject 2 and I do not respond, it shows the error message. You need to use /iscorrectresponse in your <trial>, not /correctresponse: <trial circles> / stimulusframes = [1 = redcircle] / inputdevice = keyboard / validresponse = (57, 0) / iscorrectresponse = [trial.circles.response == expressions.CorrectCounterbalanced1]/ trialduration = 2000 / errormessage = true(errormessage, 2000) / correctmessage = true(correctmessage, 2000) </trial>
|
|
|
KatrinaMcDonough
|
|
Group: Forum Members
Posts: 45,
Visits: 235
|
+x+xHello, I am trying to program a conditional statement for the correct response value, so that participants with odd and even subject numbers have different tasks - either press the spacebar or don't respond. However, the I get a message saying "'noresponse' Expression contains an unknown element or property name." It works when I select a different response (i.e. changing "noresponse" to just a different key). <shape redcircle> / shape = circle / color = red / size = (20%, 20%) / position = (50%, 50%) </shape> <shape bluecircle> / shape = circle / color = blue / size = (20%, 20%) / position = (50%, 50%) </shape> <text errormessage> / items = ("incorrect") </text> <text correctmessage> / items = ("correct") </text> <expressions> /CorrectCounterbalanced1 = if ( floor(mod(script.subjectid, 2)) != 0 ) {57;} else {noresponse;} </expressions> <trial circles> / stimulusframes = [1 = redcircle] / inputdevice = keyboard / validresponse = (57, noresponse) / correctresponse = (expressions.CorrectCounterbalanced1) / trialduration = 2000 / errormessage = true(errormessage, 2000) / correctmessage = true(correctmessage, 2000) </trial> <block block> / trials = [1-5=circles] </block> 0 is the proper indicator for no response. I.e. <expressions> /CorrectCounterbalanced1 = if ( floor(mod(script.subjectid, 2)) != 0 ) {57;} else {0;} </expressions> Thank you. I have tried this, but it still says the response (or lack of in this case) is incorrect. i.e. when I am subject 2 and I do not respond, it shows the error message.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xHello, I am trying to program a conditional statement for the correct response value, so that participants with odd and even subject numbers have different tasks - either press the spacebar or don't respond. However, the I get a message saying "'noresponse' Expression contains an unknown element or property name." It works when I select a different response (i.e. changing "noresponse" to just a different key). <shape redcircle> / shape = circle / color = red / size = (20%, 20%) / position = (50%, 50%) </shape> <shape bluecircle> / shape = circle / color = blue / size = (20%, 20%) / position = (50%, 50%) </shape> <text errormessage> / items = ("incorrect") </text> <text correctmessage> / items = ("correct") </text> <expressions> /CorrectCounterbalanced1 = if ( floor(mod(script.subjectid, 2)) != 0 ) {57;} else {noresponse;} </expressions> <trial circles> / stimulusframes = [1 = redcircle] / inputdevice = keyboard / validresponse = (57, noresponse) / correctresponse = (expressions.CorrectCounterbalanced1) / trialduration = 2000 / errormessage = true(errormessage, 2000) / correctmessage = true(correctmessage, 2000) </trial> <block block> / trials = [1-5=circles] </block> 0 is the proper indicator for no response. I.e. <expressions> /CorrectCounterbalanced1 = if ( floor(mod(script.subjectid, 2)) != 0 ) {57;} else {0;} </expressions>
|
|
|
KatrinaMcDonough
|
|
Group: Forum Members
Posts: 45,
Visits: 235
|
Hello, I am trying to program a conditional statement for the correct response value, so that participants with odd and even subject numbers have different tasks - either press the spacebar or don't respond. However, the I get a message saying "'noresponse' Expression contains an unknown element or property name." It works when I select a different response (i.e. changing "noresponse" to just a different key).
<shape redcircle> / shape = circle / color = red / size = (20%, 20%) / position = (50%, 50%) </shape>
<shape bluecircle> / shape = circle / color = blue / size = (20%, 20%) / position = (50%, 50%) </shape>
<text errormessage> / items = ("incorrect") </text>
<text correctmessage> / items = ("correct") </text>
<expressions> /CorrectCounterbalanced1 = if ( floor(mod(script.subjectid, 2)) != 0 ) {57;} else {noresponse;} </expressions>
<trial circles> / stimulusframes = [1 = redcircle] / inputdevice = keyboard / validresponse = (57, noresponse) / correctresponse = (expressions.CorrectCounterbalanced1) / trialduration = 2000 / errormessage = true(errormessage, 2000) / correctmessage = true(correctmessage, 2000) </trial>
<block block> / trials = [1-5=circles] </block>
|
|
|