Hi Dave,
I used your last response to allow for continuous feedback in one of my tasks and it worked perfectly.
However, I have just tried to apply the same example script you sent on another (very similar) script and Inquisit keeps giving me error messages.
Here is some of the script for the task in which the feedback works:
******************************************************** VALUES & EXPRESSIONS ********************************************************
<values>
/ highreward = 10
/ lowreward = 1
/ reward = 0
/ RT = 0
/ points = 0
/ totalscore = 0
</values>
<expressions>
/ calculatereward = max (0, (1000 - values.RT) * 0.002 * values.reward)
</expressions>
************************************************ TRIALS **********************************************
*********************** FEEDBACK ***********************
<trial feedbacktrial>
/ stimulusframes = [1 = FBtext]
/ response = timeout (1000)
/ recorddata = false
</trial>
<text FBtext>
/ items = ("Correct! You win <%values.points%> MONEY points")
/ fontstyle = ("Arial", 4.79%, false, false, false, false, 5, 0)
/ position = (50,50)
/ color = (0, 255, 0)
/ txbgcolor = (0, 0, 0)
</text>
************************
<trial 999>
/ stimulusframes = [1=error]
/ response = timeout (1000)
/ recorddata = false
</trial>
<text error>
/ fontstyle = ("Arial", 4.79%, false, false, false, false, 5, 0)
/ items = ("Incorrect! You lose 5 MONEY points")
/ position = (50,50)
/ color = (255, 0, 0)
/ txbgcolor = (0, 0, 0)
</text>
********************************************************* HD (RED) TRIALS ************************************************
************************************* DIAMOND TOP ***************************************
<trial HRT1>
/ stimulustimes = [1 = fixation; 800 = Diamond_Top, Red_BR, Grey_Top_Right, Grey_Bottom, Grey_Bottom_Left, Grey_Top_Left, xdat1]
/ correctresponse = (Diamond_Top)
/ validresponse = (Red_BR, Diamond_Top)
/ ontrialbegin = [values.reward = values.highreward]
/ ontrialend = [values.RT = trial.HRT1.latency; values.points = expressions.calculatereward; values.totalscore = values.totalscore + expressions.calculatereward]
/ branch = (trial.HRT1.correct, EQ, 1, feedbacktrial)
/ branch = (trial.HRT1.correct, EQ, 0, 999)
/ trialduration = 5000
/ responsetime = 800
/ responseinterrupt = trial
</trial>
<trial HRT2>
/ stimulustimes = [1 = fixation; 800 = Diamond_Top, Red_B, Grey_Top_Right, Grey_Bottom_Right, Grey_Bottom_Left, Grey_Top_Left, xdat2]
/ correctresponse = (Diamond_Top)
/ validresponse = (Red_B, Diamond_Top)
/ ontrialbegin = [values.reward = values.highreward]
/ ontrialend = [values.RT = trial.HRT2.latency; values.points = expressions.calculatereward; values.totalscore = values.totalscore + expressions.calculatereward]
/ branch = (trial.HRT2.correct, EQ, 1, feedbacktrial)
/ branch = (trial.HRT2.correct, EQ, 0, 999)
/ trialduration = 5000
/ responsetime = 800
/ responseinterrupt = trial
</trial>
<trial HRT3>
/ stimulustimes = [1 = fixation; 800 = Diamond_Top, Red_BL, Grey_Top_Right, Grey_Bottom_Right, Grey_Bottom, Grey_Top_Left, xdat3]
/ correctresponse = (Diamond_Top)
/ validresponse = (Red_BL, Diamond_Top)
/ ontrialbegin = [values.reward = values.highreward]
/ ontrialend = [values.RT = trial.HRT3.latency; values.points = expressions.calculatereward; values.totalscore = values.totalscore + expressions.calculatereward]
/ branch = (trial.HRT3.correct, EQ, 1, feedbacktrial)
/ branch = (trial.HRT3.correct, EQ, 0, 999)
/ trialduration = 5000
/ responsetime = 800
/ responseinterrupt = trial
</trial>
This works perfectly.
However, the following is from my next task in which I've employed almost exactly the same script and I keep getting error messages such as "Expression values.reward is invalid. Expression contains an unkown element or property name." Similar messages appear for values.RT too (and perhaps others but I haven't yet checked).
******************************************************** VALUES & EXPRESSIONS ********************************************************<values>
/ normalreward = 1
/ reward = 0
/ RT = 0
/ points = 0
/ totalscore = 0
</values>
<expressions>
/ calculatereward = max (0, (1000 - values.RT) * 0.002 * values.reward)
</expressions>
******************************** ERROR FEEDBACK *********************************
<trial 999A>
/ stimulusframes=[1=error_A]
/ response = timeout(1000)
/ recorddata = false
</trial>
<text error_A>
/ font = ("Arial", 50, 400, 0, 34)
/ items = ("Incorrect! You lose 5 ALCOHOL points")
/ position = (50,50)
/ color = (255, 0, 0)
/ txbgcolor = (0, 0, 0)
</text>
*********************
<trial 999C>
/ stimulusframes=[1=error_C]
/ response = timeout(1000)
/ recorddata = false
</trial>
<text error_C>
/ font = ("Arial", 50, 400, 0, 34)
/ items = ("Incorrect! You lose 5 CHOCOLATE points")
/ position = (50,50)
/ color = (255, 0, 0)
/ txbgcolor = (0, 0, 0)
</text>
***********************
<trial 999N>
/ stimulusframes=[1=error_N]
/ response = timeout(1000)
/ recorddata = false
</trial>
<text error_N>
/ font = ("Arial", 50, 400, 0, 34)
/ items = ("Incorrect! You lose 0 points")
/ position = (50,50)
/ color = (255, 0, 0)
/ txbgcolor = (0, 0, 0)
</text>
******************************** POSITIVE FEEDBACK *********************************
<trial A_FBtrial>
/ stimulusframes = [1 = A_FBtext]
/ response = timeout (1000)
/ recorddata = false
</trial>
<text A_FBtext>
/ items = ("Correct! You win <%values.points%> ALCOHOL points")
/ fontstyle = ("Arial", 4.79%, false, false, false, false, 5, 0)
/ position = (50,50)
/ color = (0, 255, 0)
/ txbgcolor = (0, 0, 0)
</text>
**********************
<trial C_FBtrial>
/ stimulusframes = [1 = C_FBtext]
/ response = timeout (1000)
/ recorddata = false
</trial>
<text C_FBtext>
/ items = ("Correct! You win <%values.points%> CHOCOLATE points")
/ fontstyle = ("Arial", 4.79%, false, false, false, false, 5, 0)
/ position = (50,50)
/ color = (0, 255, 0)
/ txbgcolor = (0, 0, 0)
</text>
*********************
<trial N_FBtrial>
/ stimulusframes = [1 = N_FBtext]
/ response = timeout (1000)
/ recorddata = false
</trial>
<text N_FBtext>
/ items = ("Correct! Your Reaction Time was <%values.RT%> ms")
/ fontstyle = ("Arial", 4.79%, false, false, false, false, 5, 0)
/ position = (50,50)
/ color = (0, 255, 0)
/ txbgcolor = (0, 0, 0)
</text>
************************************* STANDARD TRIALS 1 *********************************************
<trial 1>
/ stimulustimes = [1 = fixation; 500 = yellow_up; 800 = blackleft_down, blackright_down, blackcentre_down, xdat1; 4999 = end]
/ correctresponse = (blackleft_down)
/ validresponse = (blackleft_down, blackright_down, blackcentre_down)
/ ontrialbegin = [values.reward = values.normalreward]
/ ontrialend = [values.RT = trial.1.latency; values.points = expressions.calculatereward; values.totalscore = values.totalscore + expressions.calculatereward]
/ branch = (trial.1.correct, EQ, 1, C_FBtrial)
/ branch = (trial.1.correct, EQ, 0, 999C)
/ trialduration = 5000
/ responsetime = 800
/ responseinterrupt = trial
</trial>
<trial 2>
/ stimulustimes = [1 = fixation; 500 = green_up; 800 = blackleft_down, blackright_down, blackcentre_down, xdat2; 4999 = end]
/ correctresponse = (blackright_down)
/ validresponse = (blackleft_down, blackright_down, blackcentre_down)
/ ontrialbegin = [values.reward = values.normalreward]
/ ontrialend = [values.RT = trial.2.latency; values.points = expressions.calculatereward; values.totalscore = values.totalscore + expressions.calculatereward]
/ branch = (trial.2.correct, EQ, 1, A_FBtrial)
/ branch = (trial.2.correct, EQ, 0, 999A)
/ trialduration = 5000
/ responsetime = 800
/ responseinterrupt = trial
</trial>
<trial 3>
/ stimulustimes = [1 = fixation; 500 = pink_up; 800 = blackleft_down, blackright_down, blackcentre_down, xdat3; 4999 = end]
/ correctresponse = (blackcentre_down)
/ validresponse = (blackleft_down, blackright_down, blackcentre_down)
/ ontrialbegin = [values.reward = values.normalreward]
/ ontrialend = [values.RT = trial.3.latency; values.points = expressions.calculatereward; values.totalscore = values.totalscore + expressions.calculatereward]
/ branch = (trial.3.correct, EQ, 1, N_FBtrial)
/ branch = (trial.3.correct, EQ, 0, 999N)
/ trialduration = 5000
/ responsetime = 800
/ responseinterrupt = trial
</trial>
I can't figure out what the problem is as - as far as I can tell - both scripts seem almost identical in their feedback settings.
Thanks again for any help you can give,
Best Jay