|
Post by Ant vbd on May 27, 2020 10:22:12 GMT
Hello everyone,
I have a perfectly functioning experiment that includes a training block and a test block. I wanted to implement some additional instructions in the test block if a participant made 15 or more errors in the training block.
However, when I add :
if &counterError > 14 bitmap instructionsBis1 delay 20000 message instructionsBis2 bitmap instructionsBis3 delay 20000 message instructionsBis4 bitmap instructionsBis5 delay 20000 message instructionsBis6 set &counterError 0 fi
I have an error stating that I have an unknown statement (even though this bit of code works perfectly fine when tested in some "task" parts with other stimuli).
Is it impossible to put conditional statements in blocks or am I making a mistake ?
Thanks !
|
|
|
Post by alexandra (AEC) on May 27, 2020 12:44:28 GMT
Hi there,
as far as I am aware, if statements work only in tasks. What about creating a practice task for your training block and saving the amount of errors and the number of the trial each in a global variable (&yourvariable). Through an if statement you could present your instructions at the end of your last trial of the training block if participants made 15 or more errors.
|
|
|
Post by Ant vbd on May 28, 2020 8:55:36 GMT
Hello, Thanks for your quick reply and thanks for your solution ! Unfortunately I'm not sure it will work in my case, but now that I know I can't use "if" in blocks, I can focus on finding an alternative way
|
|
|
Post by PsyToolkit on May 28, 2020 15:37:29 GMT
I agree that conditionals in the blocks would be desirable and will think of implementing this is a future version.
|
|
|
Post by Ant vbd on May 29, 2020 9:52:32 GMT
This would indeed be a nice feature. Thanks for your work and considering this addition!
|
|