Hello, I’ve been working on getting this memory task to work online. The url of the experiment is: Pavlovia and the repository is public.
On an earlier version of this project I was getting a lot of reference errors so I went in and started editing the JS file directly to define variables. I think this ended up creating more errors. Here is the question I posted then.
Now, I got rid of the import statements and worked on modifying the JS code so that the ‘translation’ is accurate. I didn’t edit the JS file after exporting it. I was able to upload this version, however when I tried to pilot it I got this type error. If anyone has insights on how to solve this I’d appreciate it greatly!
This time when I synced and tried to run, I got a type error for the ‘addData’ component. In the beginning we define " thisExp=psychoJS.experiment; " but I also saw on the forum that we can type our code as “psychoJS.thisExp.addData” which is how I did it. Did I sort of double-dip or leave something out here?
Thank you! I suspected I was duplicating the command. So I got rid of the additional “psychoJS” in the addData lines and just defined it in the beginning. I synced and now when I try to pilot it this time I get a different type error that “trialType” is not defined. My understanding was that psychopy defines these variables. Do you have any ideas on why this may be happening?
Great! Thank you very much for all your help, I appreciate it a lot!
I’ve defined most of my variables but the trial count seems to be a problem. (I have three total) I saw on the forum that you suggested to use different variable names, but how I had it set up was setting eTrials (encoding trials) to 0 and then at the end of the routine setting it to eTrials + 1.
Right now, if I set eTrials= 0 in the beginning of the experiment, I get an error saying I can’t do this during intialisation. If I define it as “var eTrials;” then when I set it to eTrials = 0 in the routine I get the error ‘Identifier eTrials has already been declared.’ Am I using the wrong type (identifier vs variable)?