#71096 - 2002-10-24 11:49 AM
Script error: Invalid method
|
zdarma
Getting the hang of it
Registered: 2002-10-08
Posts: 83
|
I've written a script that verifies if certain applications or shortcuts exist on a user's machine. However, I keep getting the following error when I run my script.
Script error: invalid method/function call: missing ')'!
I don't see where it wants me to add another ')' I've even tried to add another set of () at both the start and end of the directory path, but I still get the same error.
I have other lines of code that are similar, but they verify if a folder exists and I get no problem. The only real diffrence between the lines checking for a folder and one checking for a shortcut is that the folder check points to \\$postes\c$\..... while the one for the shortcut as you can see below points to \\$postes\admin$\...
I've read in other postings that I may have to use the double $$, but I tried that and it still gives me the same error message.
Does anyone have any ideas?
This is what I see in my logfile :
code:
Script error: invalid method/function call: missing ')'! IF EXIST ("\\$postes\admin$\profiles\all users\menu démarrer\programmes\dossier\appli.lnk") GOSUB APPLI ENDIF
Thanks in advance, Ian
|
|
Top
|
|
|
|
#71098 - 2002-10-25 12:18 AM
Re: Script error: Invalid method
|
zdarma
Getting the hang of it
Registered: 2002-10-08
Posts: 83
|
Holy Cow!!! You hit the nail right on the head. A little closer look at my script did show me that I was missing a " in a previous line. Thanks for that, but I have another problem that appears, now that I got by that one.
I have several GOSUBs depending on the existence of certain Folders or Links. However, one of them keeps telling me that the LABEL does not exist and returns a script error in my log file. I have checked, double checked and even triple checked to make sure the label exists. I even copied the name of the label to the gosub area and I still get the same error. I've renamed it and it keeps telling me it doesn't exist.
Any ideas?
Thx, Ian
|
|
Top
|
|
|
|
#71101 - 2002-10-25 12:47 AM
Re: Script error: Invalid method
|
zdarma
Getting the hang of it
Registered: 2002-10-08
Posts: 83
|
I checked for additional spaces already and I couldn't find any.
There are actually 12 different GOSUB routines, but I've included the last two, because all the others I tested give me the same error.
code:
IF EXIST ("\\$postes\c$\Reuters") GOSUB KOBRA ENDIF IF EXIST ("\\$postes\c$\database\glw483") GOSUB GL ENDIF GOTO LES_INFOTXT ; ;********************************* Les GOSUBs ********************************* ; :GL ? "GL existe sur le poste "+$postes RETURN
:KOBRA ? "Reuters existe sur le poste "+$postes RETURN ; ;******************** Diffusion des informations collectioné ****************** ; :LES_INFOTXT ? "$user,$postes,$sp,$processor,$espace,$internet"
Thx again in advance, Ian
|
|
Top
|
|
|
|
#71102 - 2002-10-25 12:55 AM
Re: Script error: Invalid method
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Most "Label not found" errors are a result of a missing quote before the missing label.
|
|
Top
|
|
|
|
#71103 - 2002-10-24 01:06 PM
Re: Script error: Invalid method
|
zdarma
Getting the hang of it
Registered: 2002-10-08
Posts: 83
|
If by missing a quote before the label you mean the :
I already checked if they all had one and they do. Any other ideas?
|
|
Top
|
|
|
|
#71108 - 2002-12-10 05:22 PM
Re: Script error: Invalid method
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
To see which labels exist and who reference them see our tool kixref, which you can find on our site. For a quick view use the call kixref input.kix output.txt /warnings
With the kixstrip tool you can find indeed all kind of mistypings. Documenta- tion is also available. The file kixstrip.pdf can be find on our site too.
For a fast way of cheking you code insert as first line
code:
GOTO checking_our_script
and add as last lines
code:
:checking_our_script ? "fast verification completed"
To see what is going wrong during execution you can use the kixstrip too. With the call kixstrip input.kix output.kix /debug additional code will be inserted, which will show during execution - which lines were executed - what was the error status - how much time did it consume etc. greetings.
BTW: GOSUB and GOTO doesn't need quotations.
btw: symbol on our homepage has been linked to related http://kixtart.org topic.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 583 anonymous users online.
|
|
|