|
Post by johnny05 on Mar 25, 2023 19:43:11 GMT
Hello everyone,
I have 3 conditions in my survey, and I wanted to use conterbalancing. It works for 2 conditions, but when I write my code for 3 conditions written in the same way I saw on the site (https://www.psytoolkit.org/doc3.4.4/online-survey-syntax.html#counterbalancing) it doesn't work. I filled the optional completion criteria but it doesn't work neither.
This is a part of my code :
l: chooserandom1
t: set
- random 1 2 3
l:
o: hide
t: jump
- if $chooserandom1 == 1 then goto Consigne_induction_1
- if $chooserandom1 == 2 then goto Consigne_induction_2
- if $chooserandom1 == 3 then goto consigne_generale_MC
And this is the text of error I get :
In question chooserandom1:
In set, random with numbers needs exactly 2 arguments (the range of numbers)
I also tride writing "random 1 3" in chooserandom1 but I could only get the first condition and not the two others.
What am I supposed to write to make it work ?
|
|
ts
New Member
Posts: 7
|
Post by ts on Apr 22, 2023 16:00:59 GMT
One possibility: when you set up your survey, maybe you entered only two numbers for the line: "Counterbalance participants," and so the tool is expecting only two options for $chooserandom1?
|
|
|
Post by scylla on May 9, 2023 7:49:16 GMT
Hi, I think it could be work if you add some coding ("from") in your random assignment. This is what usually works for my scripts :
l: chooserandom1 t: set - random from 1 2 3
|
|