Group: Forum Members
In my script, particpants will be rewarded 5 cents if they are correct and lose 5 cents if they are incorrect. My goal is to show the particpants a tally of the total amount of money they have earned on each trial.
With the code I have tried so far (shown below), the total monetary reward shows up and they gain 5 cents when they are correct, but instead of losing 5 cents when they are wrong, their amount stays the same.
/ ontrialend = [values.score = values.score + 0.50 *trial. DemBE_O.correct]
/ 1 = "Total score: <% values.score%>"
/ items = tally
/ hposition = (80)
/ vposition = (20)
I realize that in /ontrialend=, it make sense for them to not lose points because 0.50 is multiplied by 0.
But if I wanted the tally of money to decrease by 5 cents, how would I do this? I am pretty sure I would have to use the expression element and maybe the if, else statments, but I am having trouble figuring out how to format it.
I will also attach the full script for more context.
Thank you in advance for your help!