Hi All,
The responses to 2 different slides inform an If/then statement that sets an attribute in a task I am building. The attribute is the stimulus path for an image that participants will later see.
If a participant responds on GirlAvChoice, they will NOT respond on BoyAvChoice due to a jump - they will never see BoyAvChoice.
GirlAvChoice is for girls only, and BoyAvChoice is for boys.
The accepted responses for both AvChoice slides are the same: 1-9 (each number corresponds to an image the participant selects).
If I include only one .RESP in the inline (GirlAvChoice.RESP or BoyAvChoice.RESP), the script works like a charm and assigns all 9 of the images correctly FOR THE ONE AvChoice THAT WAS INCLUDED,
Code:
If GirlAvChoice.RESP = 1 Then
c.SetAttrib "avatar", "Female5_MBrBl_Chicago.jpg"
ElseIf GirlAvChoice.RESP = 2 Then
c.SetAttrib "avatar", "Female6_Chicago.jpg"
Else c.SetAttrib "avatar", "X.jpg"
End If
however if I include both GirlAvChoice.RESP and BoyAvChoiceRESP in the same inline, I get the following error:
Type mismatch
Error Number:13
Code:
If (BoyAvChoice.RESP = "" And GirlAvChoice.RESP = 1) Then
c.SetAttrib "avatar", "Female1.jpg"
ElseIf (GirlAvChoice.RESP = "" And BoyAvChoice.RESP = 1) Then
c.SetAttrib "avatar", "Male1.jpg"
Else c.SetAttrib "avatar", "X.jpg"
End If
This also holds for when the responses for BoyAvChoice are strings (a,b,c...) - so when the responses are NOT the same between GirlAvChoice and BoyAvChoice.
It also occurs when I keep the AvChoices separate, but in the same inline, e.g.:
If GirlAvChoice.RESP = 1 Then
c.SetAttrib "avatar", "Female1.jpg"
ElseIf GirlAvChoice.RESP = 2 Then
c.SetAttrib "avatar", "Female2.jpg"
Else c.SetAttrib "avatar", "X.jpg"
End If
If BoyAvChoice.RESP = 1 Then
c.SetAttrib "avatar", "Male1.jpg"
ElseIf BoyAvChoice.RESP = 2 Then
c.SetAttrib "avatar", "Male2.jpg"
Else c.SetAttrib "avatar", "X.jpg"
End If
and it occurs when they are in different inline scripts, one right after the other in the procedure.
The AvChoice slides are identical to one another except for the images that they carry, and I am at a bit of a loss as to how to proceed. Anyone come across this before?
Thanks,
Mika