Preventing parsing errors when using


Author
Message
Sercan
Sercan
Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)Partner Member (947 reputation)
Group: Forum Members
Posts: 25, Visits: 120
Hi,

I'm creating a script that includes files A or B, depending on the group number. These files contain the stimuli in English and Dutch, respectively. However, I get an error when I do this. How can I approach this in a way that works?

Regards,

Sercan

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Sercan Kahveci - Sunday, February 25, 2018
Hi,

I'm creating a script that includes files A or B, depending on the group number. These files contain the stimuli in English and Dutch, respectively. However, I get an error when I do this. How can I approach this in a way that works?

Regards,

Sercan

Proper syntax to do this would look like this:

Your "main" script would look like:
----
<block myblock>
/ trials = [1-4 = mytrial]
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = myitems
</text>

//odd group numbers receive English items
<include>
/ precondition = [mod(script.groupid, 2) == 1]
/ file = "englishitems.iqx"
</include>

//even group numbers receive Dutch items
<include>
/ precondition = [mod(script.groupid, 2) == 0]
/ file = "dutchitems.iqx"
</include>
---

englishitems.iqx would contain the following:
----
//English
<item myitems>
/ 1 = "eng 01"
/ 2 = "eng 02"
/ 3 = "eng 03"
/ 4 = "eng 04"
</item>
----

dutchitems.iqx would contain the following:
----
//Dutch
<item myitems>
/ 1 = "nl 01"
/ 2 = "nl 02"
/ 3 = "nl 03"
/ 4 = "nl 04"
</item>
----

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search