Fernanda,
Your puzzle interests me, but I cannot get to the puzzle itself
because of problems in your code excerpts....
0) You did not say so, but I presume that you defined your Summation
objects as global variables in the global User Script area, thus,
Dim CorrectTimes as Summation
Dim AverageAccuracy as Summation
Did you do that?
1) At one place your code uses "CorrecTimes", and at another
"CorrectTimes". Those are two different variable names, you have to
pick one or the other (I presume you meant "CorrectTimes" for both).
2) Your code for after ResponseObject includes the line
AverageAccuracy.AddObservation TempoResposta.ACC
but you have not used TempoResposta anywhere else. I suppose you
mean AverageAccuracy.ACC here, but you should clarify that.
While I am at it, I would change the code for CorrectTimes to merely
If (ResponseObject.ACC = "1") Then CorrectTimes.AddObservation
ResponseObject.RT
or even further to just
If ResponseObject.ACC Then CorrectTimes.AddObservation ResponseObject.RT
3) Your code at the end of the block contains two syntax
errors. First, you have not closed off the quotes around the 0.00 at
the end of your first line. Second, CDbl() takes only one argument,
but on the second line you have placed the parentheses around two
arguments. For that matter, you should not need the CDbl() and
CString() conversions at all, the following should work just as well:
c.SetAttrib "BlockRT", Format( CorrectTimes.Mean, "0.00" )
c.SetAttrib "BlockACC", Format( (AverageAccuracy.Mean * 100), "0.00" )
I discovered all this merely by pasting your own code into E-Studio
and attempting to compile, at which time I got compile-time
errors. When posting code to the Group, best to copy code excerpts
directly from your E-Studio files rather than retyping into a
message. I had to give up any further exploration after running into
all these errors because I do not know if any of those might cause
your problem.
With that said, I will add one more thing that may affect your
feedback calculation. You must make sure that the code after
ResponseObject does *not* execute until after ResponseObject gets a
response! You may do that in several ways:
- Run another stimulus object between your ResponseObject and
the inline code.
- Set Duration of ResponseObject to "(infinite)" (and of course
End Action to "Terminate").
- Set PreRelease of ResponseObject to 0.
Otherwise, if your inline code runs during the presentation of
ResponseObject but before it gets a response (very easy to do with
PreRelease and a finite Duration), then the feedback calcuations will
be wrong. This has become a particular problem as users with habits
learned in older versions of E-Prime move up to EP2.0.10 (I know, I
got bit by this myself just last week!).
-----
David McFarlane
E-Prime training
online:
http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (
https://twitter.com/EPrimeMaster )
/----
Stock reminder: 1) I do not work for PST. 2) PST's trained staff
take any and all questions at
https://support.pstnet.com , and they
strive to respond to all requests in 24-48 hours, so make full use of
it. 3) In addition, PST offers several instructional videos on their
YouTube channel (
http://www.youtube.com/user/PSTNET ). 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.
\----