ReferenceError: ReferenceError: bart_totall_list is not defined

URL of experiment: Pavlovia

Description of the problem:
I have a game where I would like the accumulated score to be recorded into the data file at the end of each block (2 blocks in total). But it seemed like the variable to be recorded was not properly defined. Does anyone know how should I fix this issue? Any help would be appreciated!

Here are the screenshots of the error message and the components that might be related:



Without having looked closer at your code: In line 3 of your “code_11” python script you reference bart_totall_list. From what I can see, you do not have defined it prior to this reference, though. You may add the following statement (probalby in the “Begin Experiment”-tab):
bart_totall_list = []
This defines the variable as a list thus making it possible to reference it later on.

However, it seems that you have many more code components, so I do not know if this is in line with your logic.

Best,
umb

Thanks for the suggestion! I have just added the statement to the Begin Experiment tab. But the same error still showed up…Perhaps I should provide more codes/ anything else for you? Please advice. (Sorry I am super new to coding and psychopy…)

Are you viewing the latest version of the code?

Ctrl-Shift-R in Chrome or an incognito tab.