Study/Recall test: errors in script
David McFarlane
mcfarla9 at msu.edu
Sat Sep 29 18:27:46 UTC 2012
If you print out the Size of your Water List, and the value of
FindTarget on each iteration of the Do Loop, then I bet you will find
that, just before the crash, FindTarget takes a value outside of the
List levels (i.e., <1, or >Size). In that case, you need to make sure
that FindTarget never does that.
-----
David McFarlane
E-Prime training online:
http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (twitter.com/EPrimeMaster)
/-----------
Stock reminder: 1) I do not work for PST. 2) PST's trained staff
take any and all questions at
http://support.pstnet.com/e%2Dprime/support/login.asp , and they
strive to respond to all requests in 24-48 hours -- this is pretty
much their substitute for proper documentation, so make full use of
it. 3) In addition, PST takes questions at their Facebook page
(http://www.facebook.com/pages/Psychology-Software-Tools-Inc/241802160683 ),
and offers several instructional videos there and on their YouTube
channel (http://www.youtube.com/user/PSTNET ) (no Twitter feed yet,
though). 4) If you do get an answer from PST staff, please extend the
courtesy of posting their reply back here for the sake of others.
\-----------
Quoting MegCG <mcrawford at islander.tamucc.edu>:
> This is a simple recall memory test, but because of the requirements for
> data recording, I'm running into a snag with the script.
>
> My test begins with Study Block that has 2 nested lists (Water & Land )
> within a StudyList. Half the words from each nested list are presented in
> random order. Water list has 12 words, Land list has 12 different words
> (total 24 words to pool from). The 12 random words that are presented are
> marked in the following Test Block on the single list, RecallList.
> RecallList is created with 4 attributes ("Word", "Sampled",
> "CorrectAnswer", "Type"; all values set at /?/). The script that takes the
> words presented in the Study session and moves them to the RecallList is as
> follows:
> -----------------------------
> 'Mark the selected level as 1=sampled and z=correct in the StudyList
> Dim RowIdentifier As Integer
>
> RowIdentifier = RowIdentifier + 1
>
> RecallList.SetAttrib RowIdentifier, "Word", c.GetAttrib ("Word")
> RecallList.SetAttrib RowIdentifier, "Type", c.GetAttrib ("Type")
> RecallList.SetAttrib RowIdentifier, "Sampled", "1"
> RecallList.SetAttrib RowIdentifier, "CorrectAnswer", "z"
> -----------------------------
>
> Debug.Print let's me know that the test is successful up to this point.
>
> The problem I am having is in the next line of script in the Test Block. I
> want the program to go to the RecallList, find the words, then one at a
> time, go back through the StudyList, find the matching "Word" and change
> the "Sampled" attribute from 0 to 1. This is important because the
> "Sampled" setting (0,1) is eventually how I plan to have the non-presented
> words added to the RecallList. By doing this my data read out is remarkably
> simplified.
>
> HOWEVER, I am snagged at the script that says to go back to StudyList and
> find the corresponding word to the one from RecallList. The script looks
> like this:
> -----------------------------
> 'Add additional levels to RecallList as distractors
> Dim i As Integer
> Dim Shown As Integer
> Dim FindTarget As Integer
> Dim TotalNumSampled As Integer
>
> TotalNumSampled = 3
> Shown = 0
>
> For i = 1 To TotalNumSampled
> 'Choose levels until get a Shown level
> Do
> Shown = Shown + 1
> Loop Until RecallList.GetAttrib(Shown, "Type") = "Water"
> TargetWord = RecallList.GetAttrib(Shown, "Word")
>
> Do
> FindTarget = FindTarget + 1
> Loop Until Water.GetAttrib(FindTarget, "Word") = TargetWord
> Water.SetAttrib FindTarget, "Sampled", "1"
>
> Next i
> -----------------------------
> (the next set is for "Land" Type) This script worked perfectly last week on
> several trials. Now E-Prime keeps coming up with
> *"Run-time Error (Line 330) -999: Factor Error:
> Level specified is not valid"*
> Line 330 = Loop Until Water.GetAttrib(FindTarget, "Word") = TargetWord
>
> Does anyone have an idea why this is happening?
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
More information about the Eprime
mailing list