script error info

Amy Eschman amy.eschman at pstnet.com
Fri Aug 1 18:03:32 UTC 2003


The E-Prime User's Guide has a section on writing script (Chapter 4:
Using E-Basic) that discusses declaring and intializing variables, as
well as when to use the User Script window versus when to use an InLine.
If you are relatively new to writing script in E-Prime, this info may be
helpful to you.
 
Amy
 
*** DISCLAIMER: ALL VIEWS EXPRESSED ARE MY OWN AND DO NOT 
NECESSARILY REFLECT THOSE OF PSYCHOLOGY SOFTWARE TOOLS ***
 
Amy Eschman
Manager, Technical Support


Psychology Software Tools, Inc.

2050 Ardmore Boulevard

Suite 200

Pittsburgh, PA 15221-4610

Phone     412-271-5040

FAX       412-271-7077

Internet  http://www.pstnet.com <http://www.pstnet.com/> 

-----Original Message-----
From: Tony Zuccolotto 
Sent: Friday, August 01, 2003 1:33 PM
To: eprime at mail.talkbank.org
Subject: RE: script error info



The only thing the User Script area can be used for is declaring
variables, constants, or complete functions/subroutines, i.e. you can't
execute any code in there that are not inside of a declared
function/subroutine.

 

You need to put just the following line in User Script...

            Dim g_nTotalTrial As Long

 

...and then the rest of the script you have listed needs to go inside an
InLine object that you drop near or at the end of your trial procedure
(i.e. wherever else it is appropriate in your paradigm to have
g_nTotalTrial incremented).

 

Regards,

Tony

 

-----Original Message-----
From: Drtweets19 at cs.com [mailto:Drtweets19 at cs.com] 
Sent: Friday, August 01, 2003 12:24 PM
To: eprime at mail.talkbank.org
Subject: script error info

 

This is what we wrote in the User Script

'Update the total trial count
'Set value as an attribute for display

g_nTotalTrial = g_nTotalTrial+1
c.SetAttrib "TrialCount", g_nTotalTrial

This is what we get in return: 
Compile Error (Line 372, Col 1)
128: Variable not defined

Note: we are trying to install the signal detection theory experiment
from mel labs to e-prime.

Natalie 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20030801/4b5f0a0a/attachment.htm>


More information about the Eprime mailing list