In my self-paced reading experiment, I have comprehension questions on some trials and the accuracy of every trial is logged as either “correct” or “incorrect”. When a trial without question is at the final row of the CSV file, it is logged as “correct” when I try the code even though the corresponding slot in the CSV is blank (as in ,,). I couldn’t figure out what causes this. How can I solve this? Here is the link:
This is because the value of the global Var element named “correct” at that time is "correct", because the previous trial set it to “correct.” Replace newVar("correct").global(), with newVar("correct").global().set("NA"), if you want trials without a question to report “NA” instead