Can't get addlevel commant to do the trick...(plus another question)

liwenna liwenna at gmail.com
Sun Oct 23 11:27:18 UTC 2011


Hi Gilis,

Not sure about the first question you ask, but could it have something
to do with the line 'stimlist.AddLevel 0' ?  Seems to me that you're
adding zero levels there making that line either redundant or possibly
messing up your script (given that the error message seems to have
something to do with a mismatch between the numbering or number of
levels).

As for the second question: I think you'll have to use the
stimlist.reset command before you can operate on the attribute values.
But what confuses me more is what the possible location of this script
is?? If it's on the proc that is nested in stimlist than you should
(perhaps even could?) not tamper with the stimlist that the proc is in
while if it's not on the proc that is nested into stimlist than you're
in the wrong context (the c in c.getattrib) to get the value of the
attribute using that command.

Perhaps (guessing here) you overlooked the part where adding levels
with a script should be done to a separate list that get's located
later in the main procedure than the list that the program is
currently 'working'  in, i.e not the list that is active when the
inline is encountered.

On 23 okt, 00:08, gilis <gilads... at gmail.com> wrote:
> Hi all..
>
> when I try to do that:
>
> dim nLevel as integer
>
> for nLevel= 1 to 10
>
> stimlist.AddLevel 0
>
> stimlist.SetWeight nLevel, "1"
>
> stimlist.SetProc nLevel, "trialproc"
>
> stimlist.SetAttrib nLevel, "word", "nothing"
>
> stimlist.SetAttrib nLevel , "Word_type", "notrealy"
>
> stimlist.SetAttrib nLevel, "correct", "0"
>
> stimlist.SetAttrib nLevel, "xcolor", "black"
>
> Set stimlist.TerminateCondition = Cycles(1)
>
> Set stimlist.ResetCondition = Samples(10)
>
> stimlist.Reset
>
> Next nLevel
>
> I get "level that is an integer with level count mismatch" -well, I
> tried to solve it in many ways, but I guess that some help could be
> more helpful.
>
> Second question is about this issue:
>
> dim a(9) as string
> dim stimarray(9) as string
> dim c1 as string
> dim m as integer
>
> a(0)="word1"
> .
> .
> a(9)="word10"
> .
> .
> .
>
> for m=1 to 1o
> stimlist.SetAttrib m, "word", stimarray(m-1)
> c1 = c.getattrib("word")
> if c1 = a(0) or a(1) or a(2) or a(3) or a(4) then
> stimlist.SetAttrib m, "correct", 1
> end if
>
> It keep telling me that there is no such attribute as "word", though
> you can see that I predefined one and just to make sure I also did it
> in the relevant list object. Again, I tried to solve it in many ways
> but your help sounds like a better idea.
>
> Thanks in advance,
> Gilis

-- 
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 this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list