SyntaxError: Unexpected identifier

URL of experiment:

Description of the problem: I got the error - SyntaxError: Unexpected identifier - for the line feedback_text.setText(score_text); in the code below.
Any ideas?
Thanks! :slight_smile:

    score_text = (((("Bu denemedeki performansinizla " + trial_score + " puan kazandiniz.\nToplam puaniniz ") + total_score + ".")

Do you need to do anything to convert the scores to strings in JavaScript? I can only really proof read Python code

@wakecarter I did that in Python, and in the autotranslated version it had tostring() too. But then it gave the error -cannot read property ‘tostring’ of undefined- . So I deleted tostring() and tried again. But then I got this error :smiley:

It sounds like the problem is with trial_score or total_score

Define them both as 0 in a Begin Experiment code tab

They already are defined as 0, trial score is set to zero at the beginning of each trial. And the total score once at the beginning of the experiment. :confused:

did you manage to slove the problem?