By wsly - 2/8/2016
Hi! I am testing my <batch> sequence before uploading it on to the web. I have an issue with the script attached: after some trials it crashes saying <unable to initialize picture probe number 0>. Could someone be so kind to tell me what I did wrong? It would be much appreciated!!
|
By Dave - 2/8/2016
> after some trials it crashes saying <unable to initialize picture probe number 0>.
You use a values entry to select the item in <picture probe>
<picture probe> /items = stims /select = values.probestim /position = (50%, 50%) /size = (30%, 30%) </picture>
What the error means is that at the point it occurs values.probestim is null or equal to zero. Neither is a valid item number and there is no such thing as a "zero-th" image file. You need to make sure that values.probestim (as well as all the other values you use for item selection) are always set to a valid item number.
For example, in <trial negativeprobe> you try to set values.probestim to an item number pulled from a <list>
<trial negativeprobe> /inputdevice = keyboard /ontrialbegin = [values.probestim = list.negativeprobes.nextvalue] /stimulusframes = [1 = probe, in, out] ... </trial>
That <list>, however, does not actually hold any items / item numbers at all. Hence, values.probestim will be set to null.
<list negativeprobes> /replace = false / selectionrate = always </list>
Run this short example to see what happens:
<values> / probestim = 1 </values>
<block myblock> / trials = [1=a; 2=b] </block>
<trial a> / stimulusframes = [1=mytext] / validresponse = (57) </trial>
<trial b> / ontrialbegin = [values.probestim = list.negativeprobes.nextvalue; ] / stimulusframes = [1=mytext] / validresponse = (57) </trial>
<text mytext> / items = ("values.probestim is equal to <%values.probestim%>") </text>
<list negativeprobes> /replace = false / selectionrate = always </list>
|
|