Values addition crashes script


Author
Message
n.lee.20
n.lee.20
New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)
Group: Forum Members
Posts: 7, Visits: 20
Hi

When I have added in a new value it leads to the script crashing and closes down the whole of the Inquisit desktop programme so I think I may be doing something wrong. I am also not sure if values are the best way to do it. In my task 3 shapes are randomly assigned to 3 values (£9, £5, £1) and participants make judgments based on shape and label presentations. I want to program the feedback so that it is linked to the randomly selected stimuli (e.g., incorrect you lose £9), but due to the random selection of stimuli and tag I am having some difficulties.

I have tried to do this as follows. The random selection of picture and tag works, but when I add values.icfeedback... it crashes.

<block block_info>
/ onblockend = [
if (list.nsat_tag.item(1) == "£9") {values.pic1con = "£9"; values.tag1name = "£9"; values.icfeedback1 = "incorrect - you lose 9 tokens"};
if (list.nsat_tag.item(2) == "£9") {values.pic2con = "£9"; values.tag2name = "£9"; values.icfeedback2 = "incorrect - you lose 9 tokens"};
if (list.nsat_tag.item(3) == "£9") {values.pic3con = "£9"; values.tag3name = "£9"; values.icfeedback3 = "incorrect - you lose 9 tokens"};
if (list.nsat_tag.item(1) == "£5") {values.pic1con = "£5"; values.tag1name = "£5"; values.icfeedback1 = "incorrect - you lose 5 tokens"};
if (list.nsat_tag.item(2) == "£5") {values.pic2con = "£5"; values.tag2name = "£5"; values.icfeedback2 = "incorrect - you lose 5 tokens"};
if (list.nsat_tag.item(3) == "£5") {values.pic3con = "£5"; values.tag3name = "£5"; values.icfeedback3 = "incorrect - you lose 5 tokens"};
if (list.nsat_tag.item(1) == "£1") {values.pic1con = "£1"; values.tag1name = "£1"; values.icfeedback1 = "incorrect - you lose 1 token"};
if (list.nsat_tag.item(2) == "£1") {values.pic2con = "£1"; values.tag2name = "£1"; values.icfeedback2 = "incorrect - you lose 1 token"};
if (list.nsat_tag.item(3) == "£1") {values.pic3con = "£1"; values.tag3name = "£1"; values.icfeedback3 = "incorrect - you lose 1 token"};]
</block>

<picture picture_Pic>
/items = ("1.tif", "2.tif", "3.tif")
/select = noreplace
/position = (50%, 40%)
</picture>

<list sat_pic>
/items = ("1.tif", "2.tif", "3.tif")
/ replace = false
</list>

<list nsat_pic>
/items = ("1.tif", "2.tif", "3.tif")
</list>

## images
<picture Pic1>
/items = ("<% list.nsat_pic.item(1) %>")
/position = (50%, 35%)
</picture>

<picture Pic2>
/items = ("<% list.nsat_pic.item(2) %>")
/ position = (50%, 35%)
</picture>

<picture Pic3>
/items = ("<% list.nsat_pic.item(3) %>")
/ position = (50%, 35%)
</picture>

========================
<list sat_tag>
/items = ("£9", "£5", "£1")
/replace = false
</list>

<list nsat_tag>
</list>

## tags
<text Tag1>
/ items=("<% list.nsat_tag.item(1) %>")
/ position = (50%, 65%)
/ fontstyle = ("Arial Black", 5%)
</text>

<text Tag2>
/ items = ("<% list.nsat_tag.item(2) %>")
/ position = (50%, 65%)
/ fontstyle = ("Arial Black", 5%)
</text>

<text Tag3>
/ items = ("<% list.nsat_tag.item(3) %>")
/ position = (50%, 65%)
/ fontstyle = ("Arial Black", 5%)
</text>

=======================
<text feedback_C>
/ items = ("correct")
/ position = (50%, 50%)
/ fontstyle = ("Arial Black", 32pt, true, false, false, false, 5, 1)
</text>

<text feedback_IC9>
/ items = ("incorrect - you lose 9 tokens")
/ position = (50%, 50%)
/ fontstyle = ("Arial Black", 32pt, true, false, false, false, 5, 1)
</text>

<text feedback_IC5>
/ items = ("incorrect - you lose 5 tokens")
/ position = (50%, 50%)
/ fontstyle = ("Arial Black", 32pt, true, false, false, false, 5, 1)
</text>

<text feedback_IC1>
/ items = ("incorrect - you lose 1 token")
/ position = (50%, 50%)
/ fontstyle = ("Arial Black", 32pt, true, false, false, false, 5, 1)
</text>

<text feedback_NR>
/ items = ("too slow")
/ position = (50%, 50%)
/ fontstyle = ("Arial Black", 32pt, true, false, false, false, 5, 1)
</text>

=======
Example trial
<trial Con1>
/ ontrialbegin = [ values.Con_match = "match"; values.Con_shape = values.pic1con;
       values.Stim_Content =picture.Pic1.currentitem; values.Con_label = text.Tag1.currentitem;
       values.cres=values.mRes; values.wres = values.nRes; values.TrialID += 1;]
/ stimulustimes = [0=fixation; 500=Pic1, Tag1;650=clearscreen]
/ correctresponse = (values.cres)
/ validresponse = (values.nRes, values.mRes)
/ beginresponsetime = 500
/ responseinterrupt = immediate
/ response = timeout(1500)
/ posttrialpause = parameters.iti
/ responsemessage = (values.cres, feedback_C, 500)
/ responsemessage = (values.wres, values.icfeedback1, 500)
/ responsemessage = ("", feedback_NR, 500)
</trial>

Many thanks in advance for any help as I am not sure what is causing the issue so I don't therefore know where to look to solve it.

Naomi
Dave
Dave
Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)
Group: Administrators
Posts: 11K, Visits: 65K
n.lee.20 - 2/16/2021
Hi

When I have added in a new value it leads to the script crashing and closes down the whole of the Inquisit desktop programme so I think I may be doing something wrong. I am also not sure if values are the best way to do it. In my task 3 shapes are randomly assigned to 3 values (£9, £5, £1) and participants make judgments based on shape and label presentations. I want to program the feedback so that it is linked to the randomly selected stimuli (e.g., incorrect you lose £9), but due to the random selection of stimuli and tag I am having some difficulties.

I have tried to do this as follows. The random selection of picture and tag works, but when I add values.icfeedback... it crashes.

<block block_info>
/ onblockend = [
if (list.nsat_tag.item(1) == "£9") {values.pic1con = "£9"; values.tag1name = "£9"; values.icfeedback1 = "incorrect - you lose 9 tokens"};
if (list.nsat_tag.item(2) == "£9") {values.pic2con = "£9"; values.tag2name = "£9"; values.icfeedback2 = "incorrect - you lose 9 tokens"};
if (list.nsat_tag.item(3) == "£9") {values.pic3con = "£9"; values.tag3name = "£9"; values.icfeedback3 = "incorrect - you lose 9 tokens"};
if (list.nsat_tag.item(1) == "£5") {values.pic1con = "£5"; values.tag1name = "£5"; values.icfeedback1 = "incorrect - you lose 5 tokens"};
if (list.nsat_tag.item(2) == "£5") {values.pic2con = "£5"; values.tag2name = "£5"; values.icfeedback2 = "incorrect - you lose 5 tokens"};
if (list.nsat_tag.item(3) == "£5") {values.pic3con = "£5"; values.tag3name = "£5"; values.icfeedback3 = "incorrect - you lose 5 tokens"};
if (list.nsat_tag.item(1) == "£1") {values.pic1con = "£1"; values.tag1name = "£1"; values.icfeedback1 = "incorrect - you lose 1 token"};
if (list.nsat_tag.item(2) == "£1") {values.pic2con = "£1"; values.tag2name = "£1"; values.icfeedback2 = "incorrect - you lose 1 token"};
if (list.nsat_tag.item(3) == "£1") {values.pic3con = "£1"; values.tag3name = "£1"; values.icfeedback3 = "incorrect - you lose 1 token"};]
</block>

<picture picture_Pic>
/items = ("1.tif", "2.tif", "3.tif")
/select = noreplace
/position = (50%, 40%)
</picture>

<list sat_pic>
/items = ("1.tif", "2.tif", "3.tif")
/ replace = false
</list>

<list nsat_pic>
/items = ("1.tif", "2.tif", "3.tif")
</list>

## images
<picture Pic1>
/items = ("<% list.nsat_pic.item(1) %>")
/position = (50%, 35%)
</picture>

<picture Pic2>
/items = ("<% list.nsat_pic.item(2) %>")
/ position = (50%, 35%)
</picture>

<picture Pic3>
/items = ("<% list.nsat_pic.item(3) %>")
/ position = (50%, 35%)
</picture>

========================
<list sat_tag>
/items = ("£9", "£5", "£1")
/replace = false
</list>

<list nsat_tag>
</list>

## tags
<text Tag1>
/ items=("<% list.nsat_tag.item(1) %>")
/ position = (50%, 65%)
/ fontstyle = ("Arial Black", 5%)
</text>

<text Tag2>
/ items = ("<% list.nsat_tag.item(2) %>")
/ position = (50%, 65%)
/ fontstyle = ("Arial Black", 5%)
</text>

<text Tag3>
/ items = ("<% list.nsat_tag.item(3) %>")
/ position = (50%, 65%)
/ fontstyle = ("Arial Black", 5%)
</text>

=======================
<text feedback_C>
/ items = ("correct")
/ position = (50%, 50%)
/ fontstyle = ("Arial Black", 32pt, true, false, false, false, 5, 1)
</text>

<text feedback_IC9>
/ items = ("incorrect - you lose 9 tokens")
/ position = (50%, 50%)
/ fontstyle = ("Arial Black", 32pt, true, false, false, false, 5, 1)
</text>

<text feedback_IC5>
/ items = ("incorrect - you lose 5 tokens")
/ position = (50%, 50%)
/ fontstyle = ("Arial Black", 32pt, true, false, false, false, 5, 1)
</text>

<text feedback_IC1>
/ items = ("incorrect - you lose 1 token")
/ position = (50%, 50%)
/ fontstyle = ("Arial Black", 32pt, true, false, false, false, 5, 1)
</text>

<text feedback_NR>
/ items = ("too slow")
/ position = (50%, 50%)
/ fontstyle = ("Arial Black", 32pt, true, false, false, false, 5, 1)
</text>

=======
Example trial
<trial Con1>
/ ontrialbegin = [ values.Con_match = "match"; values.Con_shape = values.pic1con;
       values.Stim_Content =picture.Pic1.currentitem; values.Con_label = text.Tag1.currentitem;
       values.cres=values.mRes; values.wres = values.nRes; values.TrialID += 1;]
/ stimulustimes = [0=fixation; 500=Pic1, Tag1;650=clearscreen]
/ correctresponse = (values.cres)
/ validresponse = (values.nRes, values.mRes)
/ beginresponsetime = 500
/ responseinterrupt = immediate
/ response = timeout(1500)
/ posttrialpause = parameters.iti
/ responsemessage = (values.cres, feedback_C, 500)
/ responsemessage = (values.wres, values.icfeedback1, 500)
/ responsemessage = ("", feedback_NR, 500)
</trial>

Many thanks in advance for any help as I am not sure what is causing the issue so I don't therefore know where to look to solve it.

Naomi

Please provide the full script and all files it requires to run. I cannot look into a crash if I don't have something I can actually execute.
n.lee.20
n.lee.20
New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)
Group: Forum Members
Posts: 7, Visits: 20

Hi Dave

Thank you for getting back to me so quickly, sorry for not attaching before. Please find attached now.

Many thanks
Attachments
Expt_crashing.zip (7 views, 24.00 KB)
Dave
Dave
Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)
Group: Administrators
Posts: 11K, Visits: 65K
n.lee.20 - 2/16/2021

Hi Dave

Thank you for getting back to me so quickly, sorry for not attaching before. Please find attached now.

Many thanks

The problem with your script are the following constructions:

/ errormessage = true(values.icfeedback1, 500)

/ responsemessage = (values.wres, values.icfeedback1, 500)

A value is not a stimulus element, so it cannot be displayed as a response stimulus of any kind. You can display <text>, <picture>, etc. as response, correct, or error messages.


n.lee.20
n.lee.20
New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)
Group: Forum Members
Posts: 7, Visits: 20
Hi Dave

Thank you very much for finding that error. Do you have any suggestions as to how I can get the correct error message for each trial when the stimuli are randomly selected, but the error message must be linked to that stimuli?

E.g., If stimuli 2 is selected, error message 2 is shown?

Many thanks for your ongoing help!
Dave
Dave
Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)Supreme Being (911K reputation)
Group: Administrators
Posts: 11K, Visits: 65K
n.lee.20 - 2/16/2021
Hi Dave

Thank you very much for finding that error. Do you have any suggestions as to how I can get the correct error message for each trial when the stimuli are randomly selected, but the error message must be linked to that stimuli?

E.g., If stimuli 2 is selected, error message 2 is shown?

Many thanks for your ongoing help!

You can simply do

<trial Con1>
/ ontrialbegin = [ values.Con_match = "match"; values.Con_shape = values.pic1con;
       values.Stim_Content =picture.Pic1.currentitem; values.Con_label = text.Tag1.currentitem;
       values.cres=values.mRes; values.wres = values.nRes; values.TrialID += 1;]
/ stimulustimes = [0=fixation; 500=Pic1, Tag1;650=clearscreen]
/ correctresponse = (values.cres)
/ validresponse = (values.nRes, values.mRes)
/ beginresponsetime = 500
/ responseinterrupt = immediate
/ response = timeout(1500)
/ posttrialpause = parameters.iti
/ responsemessage = (values.cres, feedback_C, 500)
/ responsemessage = (values.wres, text.icfeedback1, 500)
/ responsemessage = ("", feedback_NR, 500)
</trial>

with

<text icfeedback1>
/ items = ("<%values.icfeedback1%>")
</text>

and so forth.

n.lee.20
n.lee.20
New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)New Member (16 reputation)
Group: Forum Members
Posts: 7, Visits: 20
Thank you so much, that works perfectly! 

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search