Hoping someone can help me with a syntax error!
I plan to have a number of different conditions in my experiment, which will have a different number of blocks (maximum = 24), so I've set "/ blocks=[1-24" and am trying to come up with a way of skipping over the extra blocks for conditions which only have 12. There may be a simpler way of doing this (if so - I would love to be corrected!), but in this attempt I have run across a syntax error that I just can't figure out.
Here is a simplified version of what I've currently attempted:
<variables>
/group=(1 of
2) (blocklist=list.blockorder1)
/group=(2 of
2) (blocklist=list.blockorder2)
</variables>
<expt>
/ blocks=[1-4=blocklist]
</expt>
<list blockorder1>
/ items =
[if(list.blocklist1.selectedcount!=list.blocklist1.poolsize)list.blocklist1.nextvalue
else skipblock]
/
selectionmode = sequence
</list>
<list
blockorder2>
/ items =
[if(list.blocklist2.selectedcount!=list.blocklist2.poolsize)list.blocklist1.nextvalue
else skipblock]
/
selectionmode = sequence
</list>
<block
skipblock>
/trials =
[1=skip]
</block>
<trial
skip>
/
stimulustimes = [0=skip]
/
trialduration = 10
</trial>
<text
skip>
/ items =
(" ")
</text>
<list
blocklist1>
/ items =
(block.block1, block.block2)
/
selectionmode = sequence
</list>
<list
blocklist2>
/ items =
(block.block1, block.block2, block.block1, block.block2)
/
selectionmode = sequence
</list>
<block
block1>
/ trials =
[1=mytrial1]
</block>
<block
block2>
/ trials =
[1=mytrial2]
</block>
<trial
mytrial1>
/
stimulusframes = [1=text1]
/
validresponse = (57)
</trial>
<trial
mytrial2>
/
stimulusframes = [1=text2]
/
validresponse = (57)
</trial>
<text
text1>
/ items =
("Block 1")
</text>
<text
text2>
/ items =
("Block 2")
</text>
When I try to run this, it returns the error "The /blocks command selected an element that was not a type of block". However, it runs without errors if I change the items attribute of blockorder1 to something simple like / items = (list.blocklist1.nextvalue). So, I am guessing there is something wrong with my syntax in that expression.
However, after hours of reading through the documentation I have failed to get a single expression to work within the items attribute! I based my attempt on the template in the list element --> items attribute help file (pasted below), but I can't get the syntax from the help file to work even when I approximate it as closely as possible...
<list evenodd>
/ selectionmode = sequence
/ items =
[if ( floor(mod(block.test.currenttrialnumber, 2)) == 0 ) 1 else
2]
</list>
If anyone can help me you will receive immense amounts of my appreciation!!