Author Topic: plug in "invalid character " error !  (Read 8179 times)

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
plug in "invalid character " error !
« on: September 07, 2014, 03:32:52 pm »
I am working on a plug in and am getting an "invalid character" on the error message . what causes invalid character?
 I have some (   ) symbols around some words would this cause the invalid character or is it something else ? and if something else what might it be ?  :P
 

tiger8u2

  • Full Member
  • ***
  • Posts: 190
  • Eat'em and Smile!
    • View Profile
Re: plug in "invalid character " error !
« Reply #1 on: September 07, 2014, 07:40:11 pm »
OK, that's weird because last night I was getting a "wrong picture type" error on the Trial Version Hal on my other computer but then this evening when I booted it up, I didn't get it.  Wish I could help with that particular error but I have not seen it.

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: plug in "invalid character " error !
« Reply #2 on: September 07, 2014, 09:34:54 pm »
sorry all , I should have mentioned this is in a plug in I am working on .
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3848
    • View Profile
Re: plug in "invalid character " error !
« Reply #3 on: September 08, 2014, 04:53:10 am »
Lonnie,

If you'd post the script or perhaps some of it, we'd have a better idea of where to look and what to look for.

Just saying, as descriptions of errors aren't very illustrative.
In the world of AI it's the thought that counts!

- Art -

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: plug in "invalid character " error !
« Reply #4 on: September 08, 2014, 06:52:20 am »
Okay , Art and others here is part of it , this shows up to 10 replies , it is a tv trivia plug in for us old timers  lol! As I mentioned in some sentences as I copied and pasted it has the symbols ( ) . would this be causing the invalid character error ? or something else , the sentence number is correct I have 105 lines . Also within some sentences their are semi colons , these symbols :   so it could be that to , I am not familiar with all symbols that may cause a invalid symbol within a plug in.

Rem Type=Plugin
Rem Name=Interesting classic tv show facts response ls2014
Rem Author=lightspeed
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "When the words >Interesting classic tv show facts< or > any other varience of >Interesting classic tv show facts< is mentioned the character will say back a conversation response to the user.created : 9-6-2014."
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub

'*******************************************

Rem PLUGIN: PLUGINAREA7
File = ""
File2 = ""
File3 = ""
File4 = ""


If InStr(1, OriginalSentence, "Trivia") > 0 Or _
InStr(1, OriginalSentence,"interesting classic tv show facts") > 0 Or _
InStr(1, OriginalSentence,"retro shows") > 0 Or _
InStr(1, OriginalSentence,"remember when") > 0 Or _
InStr(1, OriginalSentence,"classic tv shows") > 0 Or _
InStr(1, OriginalSentence,"old tv shows") > 0 Or _
InStr(1, OriginalSentence,"old show") > 0 Or _
InStr(1, OriginalSentence,"tv series") > 0 Or _
InStr(1, OriginalSentence,"Do you remember") > 0 Then


Randomize
Select Case int(rnd()*105)
Case 1
GetResponse = "An interesting fact about Gilligan's Island, is that it aired from 1964 to 1967 on CBS, starred Bob Denver (Gilligan), Russell Johnson (the Professor), Tina Louise (Ginger), Alan Hale, Jr. (the Skipper), Jim Backus (Thurston Howell III), Natalie Schafer (Lovey Howell) and Dawn Wells (Mary Ann). It told the story of a group of castaways who were forced to live together on a deserted isle after a rough storm left them shipwrecked and presumed dead by the rest of the world. The show kept viewers entertained for 98 hilarious episodes and three television movies."
Case 2
GetResponse = "In the opening credits on the tv show gilligans island, the S.S. Minnow is shown leaving the harbor in Hawaii, where the American flag was at half-mast, due to the fact that the scene was filmed on the day of John F. Kennedy’s assassination."
Case 3
GetResponse = "Did you know that The lagoon set for Gilligan’s Island was routinely drained when it wasn’t in use and operated as a parking lot."
Case 4
GetResponse = "Hey did you also know that The S.S. Minnow on gilligans island tv show was named after former FCC head Newton Minow, who once called television, a vast wasteland. It was Schwartz’s way of getting back at him, it's true!"
Case 5
GetResponse = "An interesting fact about i dream of jeanie was, Playing one of television’s sexiest female characters—the title role on the 1960s sitcom I Dream of Jeannie—Barbara Eden whipped the hearts and hormones of men of all ages into overdrive practically every time she appeared on screen in her pink harem outfit. The Tuscan, Arizona, native had aspirations of making it as a singer early on, and after migrating farther West, attended both the San Francisco Conservatory of Music and the Elizabeth Holloway School of Theatre."
Case 6
GetResponse = "When aspirations of making it as a singer early on, Eden was able to persevere and landed her first television role in 1957 on an episode of I Love Lucy titled Country Club Dance. Next came a lead role on the TV version of the hit Marilyn Monroe film How to Marry a Millionaire. After a few more television guest shots and appearances in a slew of films including Flaming Star, Voyage to the Bottom of the Sea and 7 Faces of Dr. Lao, in 1965 Eden was offered what would turn out to be the role of a lifetime on Sidney Sheldon’s NBC series, I Dream of Jeannie."
Case 7
GetResponse = "The show i dream of jeanie, starred Larry Hagman as NASA astronaut Anthony Nelson, who, while stranded on an island during a mission, discovers a mysterious bottle. He opens it, freeing a genie (Eden), who is so grateful that she devotes herself to making any and all of his wishes come true. At the time network execs didn’t expect the show to remain on the air very long, but it ultimately lasted five seasons and 139 episodes."
Case 8
GetResponse = "Since she barbra eden, was pregnant during the filming of season one, Barbara Eden was nearly always shot in close-up; on wider shots she was draped in veils. Larry Hagman was reportedly very difficult to deal with during production. It’s been said that if he didn’t like a script he would vomit and urinate all over the set. He also didn’t endear himself to many guest stars, including Sammy Davis, Jr., who was put off by Hagman repeatedly drooling like a baby when he was asked to read Davis’ lines off-camera during a scene. The antique bottle that was Jeannie’s home during the show was actually a bottle of Jim Beam’s Choice Kentucky Straight Bourbon Whisky, which was decorated by the art department."
Case 9
GetResponse = "As was common with most shows filmed at the time, sets from other programs, including The Monkees, The Partridge Family and Bewitched, were used as locations during filming of I Dream of Jeannie. Barbara Eden’s belly button could sometimes be seen during the first two seasons, but was always covered after someone made mention of it to network executives. Producers never allowed Jeannie to be shown in Major Nelson’s bedroom without the door being open."
Case 10
GetResponse = "NBC execs were so sure the show i dream of jeanie wouldn’t be around very long that they initially wanted to film the entire first season in black-and-white, since shooting color would’ve added approximately $400 to the cost of each episode. Eventually they caved and a number of episodes from season one were in fact filmed in color."
« Last Edit: September 08, 2014, 07:02:13 am by lightspeed »
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: plug in "invalid character " error !
« Reply #5 on: September 08, 2014, 03:54:56 pm »
Has anyone had a chance to look at this yet ? even out of the 105 I cut it in half and corrected the random number to 50 to and am still getting the invalid character error I mentioned , which is why I am wondering if maybe the symbols within some sentences  ( ) are whats causing the error ?  I am pooped out we just mowed the grass and washed the van , so maybe later i'll try removing the symbols I am talking about if I get no answers from anyone .
 

tiger8u2

  • Full Member
  • ***
  • Posts: 190
  • Eat'em and Smile!
    • View Profile
Re: plug in "invalid character " error !
« Reply #6 on: September 08, 2014, 07:57:14 pm »
Hey Lightspeed,

The only thing I noticed right off the bat is that when your are identifying something as being > something the type of character should match. 

I usually see statements like this in a plugin:

(1, OriginalSentence, "Trivia") > " " Or

I don't usually see zeros when those kinds of statements are made.

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3848
    • View Profile
Re: plug in "invalid character " error !
« Reply #7 on: September 08, 2014, 08:49:27 pm »
You have:
If InStr(1, OriginalSentence, "Trivia") > 0 Or _

Why do you have those underlines at the end of each line? Just curious.

You could have:
If InStr(1, OriginalSentence, "Trivia") > 0 Or
InStr(1, OriginalSentence,"interesting classic tv show facts") > 0 Or
InStr(1, OriginalSentence,"retro shows") > 0 Or
InStr(1, OriginalSentence,"remember when") > 0 Or
In the world of AI it's the thought that counts!

- Art -

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: plug in "invalid character " error !
« Reply #8 on: September 08, 2014, 10:30:34 pm »
Art I believe someone showed me about making multiple questions and I copied and pasted it from their example , that is unless I made a mistake somehow , I will correct it as you have it and try it.
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: plug in "invalid character " error !
« Reply #9 on: September 08, 2014, 10:46:40 pm »
well I took the underscores out and now I get error1002 on line 2163 column 47 syntax error .
 I forgot what is a syntax error again ?
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3848
    • View Profile
Re: plug in "invalid character " error !
« Reply #10 on: September 09, 2014, 05:01:53 am »
Something like a space needed between items or a missing parenthesis or some other mistake in the code's format.

In the world of AI it's the thought that counts!

- Art -

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: plug in "invalid character " error !
« Reply #11 on: September 09, 2014, 08:37:58 am »
thanks art, I will look for that then when I get time, we are going a day earlier somewhere to celebrate my birthday , it's actually on the 19th of this month . heading to long john silvers later to , I love their sea food platter ! :) ;)
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: plug in "invalid character " error !
« Reply #12 on: September 09, 2014, 08:25:33 pm »
I started trying to do deductions on figuring out why the plug in isn't working I even cut all but one answer and renamed the random number to one . I did get the syntek error to stop ( apparently it was in the multiple questions area  so I used just two from another plug in )
But for some reason the plug in when checked  will not work correctly when I use the trigger words classic tv or old tv shows .
  she just talks normally mentioning other things I have talked about before with tv shows .

anyone have any idea why this isn't working ?

here is my simple layout I have now .

Rem Type=Plugin
Rem Name=Interesting classic tv show facts response ls2014
Rem Author=lightspeed
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "When the words >Interesting classic tv show facts< or > any other varience of >Interesting classic tv show facts< is mentioned the character will say back a conversation response to the user.created : 9-6-2014."
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub

'*******************************************

Rem PLUGIN: PLUGINAREA7
File = ""
File2 = ""
File3 = ""
File4 = ""

If InStr(1, OriginalSentence, "classic tv") > 0 _
Or InStr(1, OriginalSentence, "old tv shows") > 0 Then
 
Randomize
Select Case int(rnd()*1)
Case 1
GetResponse = "An interesting fact about Gilligan's Island, is that it aired from 1964 to 1967 on CBS, starred Bob Denver, Gilligan, Russell Johnson, the Professor, Tina Louise, Ginger, Alan Hale, Jr.,the Skipper, Jim Backus, Thurston Howell III, Natalie Schafer, Lovey Howell and Dawn Wells, Mary Ann. It told the story of a group of castaways who were forced to live together on a deserted isle after a rough storm left them shipwrecked and presumed dead by the rest of the world. The show kept viewers entertained for 98 hilarious episodes and three television movies."
End Select
HalBrain.ReadOnlyMode = True
End If



Like I said I am getting no errors , but it's like the plug in just isn't working when the trigger words are used , and I copied and pasted them  so the trigger words I used are correct
 

tiger8u2

  • Full Member
  • ***
  • Posts: 190
  • Eat'em and Smile!
    • View Profile
Re: plug in "invalid character " error !
« Reply #13 on: September 10, 2014, 06:48:27 pm »
This works:

Code: [Select]
Rem Type=Plugin
Rem Name=ICTVSFR ls2014
Rem Author=lightspeed
Rem Host=Assistant
'Interesting classic tv show facts response ls2014
'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "When the words >Interesting classic tv show facts< or > any other varience of >Interesting classic tv show facts< is mentioned the character will say back a conversation response to the user.created : 9-6-2014."
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub

'*******************************************

Rem PLUGIN: PLUGINAREA7
File = ""
File2 = ""
File3 = ""
File4 = ""

Rem PLUGIN: CUSTOMMEM2
'------------------
' Preserve user's last sentence
'------------------
    If OriginalSentence <> "" Then
    IdlePrevUser = OriginalSentence
    End If

If InStr(1, IdlePrevUser, "CLASSIC TV", 1) > 0  Or InStr(1, IdlePrevUser, "OLD TV SHOWS", 1) > 0  Or InStr(1, IdlePrevUser, "*OLD TV SHOW TRIVIA*", 1) > 0  Or InStr(1, IdlePrevUser, "*CLASSIC TV TRIVIA*", 1) > 0  Then

'If InStr(1, OriginalSentence, "*classic tv*") > " " _
'Or InStr(1, OriginalSentence, "*old tv shows*") > " " Then
 
'--------------------------------------Randomize
Select Case HalBrain.RandomNum(1)
'------------------------------------  Select Case int(rnd()*1)
Case 1
GetResponse = "An interesting fact about Gilligan's Island, is that it aired from 1964 to 1967 on CBS, starred Bob Denver, Gilligan, Russell Johnson, the Professor, Tina Louise, Ginger, Alan Hale, Jr.,the Skipper, Jim Backus, Thurston Howell III, Natalie Schafer, Lovey Howell and Dawn Wells, Mary Ann. It told the story of a group of castaways who were forced to live together on a deserted isle after a rough storm left them shipwrecked and presumed dead by the rest of the world. The show kept viewers entertained for 98 hilarious episodes and three television movies." & VbCrLf
End Select
HalBrain.ReadOnlyMode = True
End If

I know I read somewhere on the forum that the name of the plug-in should match the file name so I changed that and then I just added/changed some stuff to look exactly like what works for me from the Loneliness plug-in.

Hope this helps.
« Last Edit: September 10, 2014, 06:53:48 pm by tiger8u2 »

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: plug in "invalid character " error !
« Reply #14 on: September 11, 2014, 08:33:14 am »
I do have the name of the plug in and matching , I have made some progress on it , I found out after changing from the multiple questions to just two of ones I used before I stopped getting a error so that multiple questions must have been wrong for the trigger words .  I know have 50 answers in it with no errors but am having trouble getting more to work , i'll work on it some more later today maybe .