Hi all. Is it possible to conditionally specify the number of trials in a block element? I've tried a couple of different approaches (below), but I keep getting an 'invalid syntax' error. More details attached.
<block K_Prac_block>
/ trials = [1 - values.LETTER_item_num = noreplace(LETTER_Prac_trials)]
</block>
/ trials = [1 - "<%values.LETTER_item_num%>" = noreplace(LETTER_Prac_trials)]
Thanks,
Jeff
Syntax like the one above is not permitted. You need to implement this differently, e.g. using a /stop attribute.
<values>/ ntrials = 40</values><block myblock>/ stop = [block.myblock.trialcount>values.ntrials]/ trials = [1-10000=mytrial]</block>
Regards,
~Dave
Thanks, Dave. That did the trick. To clarify for those who find this later, the stop attribute executes after the block has run so if the ntrials variable equals the maximum, then the stop function should be
/ stop = [block.myblock.trialcount >= values.ntrials]