Displaying % accuracy
Hi, I am new to OpenSesame and trying to get to grips with the script. My experiment is an emotion recognition task, so far I have used inline script to make the layout consisting of one image and four button choices, not sure if it is correct:

I would like to display feedback of the percentage of correct answers at the end of the sequence, I have added the feedback and have entered the following inline script before the feedback based on what I found on the forums, but not sure what to define where "???" is for my particular experiment.
var.totalNoTrials += 37
if ??? == var.correct_response
var.totalCorrect += 1
var.acc = float(var.totalCorrect)/var.totalNoTrials
Comments
Hi,
First you have to define the variables before you enter the form loop. So in an line_script, do this:
After the form you can add this code.
Then, after all forms (basically after the block), you have to compute accuracy (with the formula you have used above) and finally put it into a feedback item.
Does that help?
Eduard