Technical support and scripting issues
Moderators: Dorian (MJT support), JRL
-
fightcancer
- Macro Veteran
- Posts: 257
- Joined: Fri Apr 15, 2005 8:32 am
Post
by fightcancer » Mon Oct 20, 2008 2:16 am
What's causing this error please?
Line: 13 Error - Subroutine/Label InitVars Not Found!
Here's some of my code (w/line numbers on the left).
Code: Select all
13 GoSub>InitVars
410 // Initialize the variables.
411 SRT>InitVars
438 END>InitVars
I get the error as soon as I run the macro. Not sure why. I've been running this macro for weeks.
-
fightcancer
- Macro Veteran
- Posts: 257
- Joined: Fri Apr 15, 2005 8:32 am
Post
by fightcancer » Mon Oct 20, 2008 2:37 am
Ok....
Line 369 was the culprit.
Apparently I can't have those 2 on the same line. I broke them up and it works again.
-
jpuziano
- Automation Wizard
- Posts: 1085
- Joined: Sat Oct 30, 2004 12:00 am
Post
by jpuziano » Mon Oct 20, 2008 5:09 am
fightcancer wrote:Line 369 was the culprit.
Apparently I can't have those 2 on the same line. I broke them up and it works again.
Hi Marcus,
Can you reproduce this effect? If so... I take it this is unintended?
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Mon Oct 20, 2008 8:18 am
The issue is that the comment parser expects to see the end of the comment block on its own. E.g. it is looking for a line with only "*/". Since it doesn't find that everything after it is effectively commented out, since the comment block hasn't been closed.
-
gdyvig
- Automation Wizard
- Posts: 447
- Joined: Fri Jun 27, 2008 7:57 pm
- Location: Seattle, WA
Post
by gdyvig » Wed Aug 11, 2010 5:26 pm
I am getting this error for compiled scripts under v11.
I can't find any comments like the known problem:
Code: Select all
/* // single line comment within a comment start block not allowed
But I do have:
Code: Select all
/*
// comment
// comment
(code)
*/
and
Are these commenting OK?
Do I look in the main script or the Included script?
I also set some variables and do a ChangeDir prior to the Include statement so the Include file will be found.
Thanks,
Gale
-
jpuziano
- Automation Wizard
- Posts: 1085
- Joined: Sat Oct 30, 2004 12:00 am
Post
by jpuziano » Wed Aug 11, 2010 5:54 pm
Those commenting styles look OK to me...
If you posted your error msg text and code, maybe someone here could help.
Take care
-
gdyvig
- Automation Wizard
- Posts: 447
- Joined: Fri Jun 27, 2008 7:57 pm
- Location: Seattle, WA
Post
by gdyvig » Wed Aug 11, 2010 8:35 pm
I think I figured it out.
This is valid for uncompiled scripts only:
Code: Select all
ChangeDirectory>%parmDir%
Include>parm.scp
ChangeDirectory>c:\mjt
Include>mjtlib.scp
ChangeDirectory>%SCRIPT_DIR%
When compiling a macro, your script must look like this:
Code: Select all
Include>c:\parms\parm.scp
Include>c:\mjtlib\mjtlib.scp
Or move all your include files into SCRIPT_DIR and your script will look like:
Code: Select all
Include>parm.scp
Include>mjtlib.scp
The problem was the compiler could not find my include files but displays no error messages. The error messages display when you run the compiled script.
Gale
-
jpuziano
- Automation Wizard
- Posts: 1085
- Joined: Sat Oct 30, 2004 12:00 am
Post
by jpuziano » Wed Aug 11, 2010 8:45 pm
gdyvig wrote:The problem was the compiler could not find my include files but displays no error messages. The error messages display when you run the compiled script.
Marcus can you reproduce this? If so maybe error messages could be produced?
The Help File entry for Include> does not specify that the full path should be used however the entry for Macro> does have this line:
Help File entry for Macro> wrote:It is advisable to specify the full path should the path of the script file differ from the current path or change during the execution of the calling macro.
The above line might be helpful in the Include> entry as well.
Glad you figured it out Gale... take care.