Zabaware Support Forums
Zabaware Forums => General Discussion => Topic started by: lightspeed on December 17, 2015, 11:00:35 pm
-
i am getting a error saying something like , can't use parenthese to sub, What would cause this in a plug in to give an error like that? does anyone have any idea's? i have been looking through it for any errors i may have made. >:(
-
Maybe this will help:
When you enclose a procedure's argument list in parentheses, you must use the Call keyword:
Call CreateObject("WScript.Shell").Run("program.bat", 0, True)
If you omit the Call keyword, you must also drop parentheses:
CreateObject("WScript.Shell").Run "program.bat", 0, True
-
Okay i have been going over it and found a few mistakes one was in the numbers (case) another was a comma spaced out to far , i have ched the perentheses at both ends of all the sentences to make sure i had them all in place they are all okay i rechecked twice even . also checked all the numbers in cases they were all right , checked them all twice, but am still getting the error. here is the actual error word for word.
HALSCRIPT ERROR 1044 ON LINE 2120 IN COLUMN 55. CANNOT USE PARENTHESES WHEN CALLING SUB,
THE FUNNY thing is , it mentions a line 2120.
and on the uhp file by checking the staus bar it shows at the very bottom the line only goes to 330.
This is a 150 multiple answer plug in.
P.S. I have unchecked all other plug ins .
-
Well i have been trying now to solve it through elimination , i deleted 10 lines at a time and also changed the random number appropriately. i still kept getting the very same error mentioned above . even down to the last ( first sentence i started with . i see nothing wrong with the lay out of the script :
Hre is the script :
Rem Type=Plugin
Rem Name=what do you want to watch
Rem Author=lightspeed
Rem Host=Assistant
'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()THIS IS A BLANK MULTIPLE QUESTION AND ANSWER PLUG IN TO CREATE PERSONAL PLUG INS FOR HAL CREATED WITH THE HELP OF OTHERS ON THE HAL FORUM BY LIGHTSPEED AKA LONNIE HENSLEY.
lblPlugin(0).Caption = "When the words >< or > any other varience of >< is mentioned the character will say back a conversation response to the user.created ."
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub
'*******************************************
Rem PLUGIN: PLUGINAREA7
File = ""
File2 = ""
File3 = ""
File4 = ""
InStr(1, OriginalSentence,"what do you want to watch") > 0 Then
Randomize
Select Case int(rnd()*1)
Case 1
GetResponse = "I don't know, what do you want to watch on tv?"
End Select
HalBrain.ReadOnlyMode = False
End If
-
SOMETHING STRANGE GOING ON , after i even deleted the file that was giving me problems , i was still getting the above error . i went into the brain editor into my angela brain opened it and the files are empty shouldn't it have all the tables etc. ? my angela db shows it's at 107 mb's .
Also i opened my angela brain and checked one of my hybred random talk and it worked just fine , all very strange indeed ! ???
-
next time you get the error post the Halscript.dbg file with the error issue to debug that line of code..
-
HERE YOU GO :
-
HERE ARE DIFFERENT PARTS OF THE DE BUG UP TOP IT TELLS WHAT I ENETERED THE ERROR CODE .
-
OTHERS ON DOWN THE LIST.
-
MORE
-
I HAD TO PUT THIS in sections as pics was to big .
-
AND THE LAST PART OF THE DEBUG. I HAD TO PUT THIS in sections as pics was to big . the last is in the brain editor showing a sentence that says something about keeping things short , surely this isn't the error . the randome sentences are to long . seems like i have other plug ins just as long . on the random answers !
-
I finally SOLVED the mystery , plug in errors can drive a person crazy ( with me its a short drive lol ) after i tried the debug area i finally by checking my plug in against other working ones i created finally found the problem . it was one lousy word that was missing !
if InStr(1, OriginalSentence,"what do you want to watch") > 0 Then
ON THE ABOVE SENTENCE I FORGOT TO PUT THE WORD "IF" at the beginning .
this plug in though was a 150 random sentence response one . what it is , is a personalized movie suggestion based on what movies we have .
WHEW, i am glad i finally got it figured out , thanks anyway for others that was willing to help , i do appreciate it . and if i am ever able to help anyone else somehow , if i can , i will .
-
I finally SOLVED the mystery , plug in errors can drive a person crazy ( with me its a short drive lol ) after i tried the debug area i finally by checking my plug in against other working ones i created finally found the problem . it was one lousy word that was missing !
if InStr(1, OriginalSentence,"what do you want to watch") > 0 Then
ON THE ABOVE SENTENCE I FORGOT TO PUT THE WORD "IF" at the beginning .
this plug in though was a 150 random sentence response one . what it is , is a personalized movie suggestion based on what movies we have .
WHEW, i am glad i finally got it figured out , thanks anyway for others that was willing to help , i do appreciate it . and if i am ever able to help anyone else somehow , if i can , i will .
you should know lightspeed, you can not have a universe without an IF........
-
oncuttingedge2005 , in chaos comes order, "if" it all falls in place lol ! :) ;) but you are right i should have known that , things happen though when working with 150 random sentences and up to 5 or 5 trigger words ... it's called insanity with hair pulling fits sometimes !! :) ;D