Millisecond Forums

Unable to locate element

https://forums.millisecond.com/Topic16946.aspx

By gracethenoob - 8/11/2015

In my experiment, participants see a series of objects and learn whether those (ostensibly) belong to the objects belong to them ("self") or to the experimenter ("other"). In the current task I am programming, participants see one of the images and must report who owned it (self or other). I have based my code off of a working version of another task. However, even though I specified the stimulus images the same way as the previous task, my current experimental task is not working.

The error I am given is "Could not locate element 'self'. I have checked that all the images are in the folder with my code so that's not the problem. Inquisit currently also cannot locate other elements but I suspect the same issue occurs throughout so fixing one will likely help fix them all.

My code is as follows:


<item self>
/1 = "eggplant.jpg"
/2 = "shorts.jpg"
/3 = "toydinosaur.jpg"
</item>

[...]

<trial self_test>
/ontrialbegin = [values.trialcount +=1]
/stimulustimes = [0 = focuspoint; 500 = erasefixaton; 2500 = self]
/correctresponse = ("E")
/validresponse = ("E", "I")
</trial>



What needs to be changed?
By Dave - 8/11/2015

An <item> element is *not* a stimulus element. It merely holds items. Those items can be used by a stimulus element (<text>, <picture>, etc.).

Hence

<trial self_test>
/ontrialbegin = [values.trialcount +=1]
/stimulustimes = [0 = focuspoint; 500 = erasefixaton; 2500 = self]
...
</trial>


will not work. There is no *stimulus* called "self". You need to set up a <picture> element that uses the <item> element:

<picture self>
/ items = self
...
</picture>

Those basics are covered in greater detail in the tutorials included in the Inquisit documentation.