Ok Dudes,
I been lurking for a long time, and now I finally gotta ask you coding gurus for some help here. I have a bot I made for pal worked just fine on version 8. Except for my help menu. When a user in a palroom types $help my bot responds with a list of commands. But when I try to dress the list up with different colors, I get an error messages saying that there were non-printable charicters or message was too long. Now, from my research, its about 400 chars for a single message in PT. So I know that isnt the problem.
I am using the code for the greeter for PT 9 and everything still works great except this help menu. I like the codes I got here. Props to you who allowed it to be public. Works great!!!!!
I will post the problem code, and see if you can help me figure out why it keeps erroring out in the PT room. I will post one of the various ways I tried to do this and all error out.
- Code: Select all
Private Sub HelpMe()
RTB5.Text = "..:;$kjv <Book> <Chapter>:<Verse>" & " $$ " & "$about" & " $$ " & "$help" & " $$ " & "$fav" & " $$ " & "$addfav" & " $$ " & "$delfav" & "::.."
RTB5.SelStart = InStr(RTB5.Text, "..:;") - 1
RTB5.SelLength = Len("..:;")
RTB5.SelColor = vbBlack
RTB5.SelBold = True
RTB5.SelFontSize = 8
RTB5.SelStart = InStr(RTB5.Text, "$kjv <Book> <Chapter>:<Verse>") - 1
RTB5.SelLength = Len("$kjv <Book> <Chapter>:<Verse>")
RTB5.SelColor = RGB(0, 90, 0)
RTB5.SelBold = True
RTB5.SelFontSize = 8
RTB5.SelStart = InStr(RTB5.Text, " $$ ") - 1
RTB5.SelLength = Len(" $$ ")
RTB5.SelColor = vbBlue
RTB5.SelBold = True
RTB5.SelFontSize = 8
RTB5.SelStart = InStr(RTB5.Text, "$about") - 1
RTB5.SelLength = Len("$about")
RTB5.SelColor = RGB(0, 90, 0)
RTB5.SelBold = True
RTB5.SelFontSize = 8
RTB5.SelStart = InStr(RTB5.Text, " $$ ") + 10
RTB5.SelLength = Len(" $$ ")
RTB5.SelColor = vbBlue
RTB5.SelBold = True
RTB5.SelFontSize = 8
RTB5.SelStart = InStr(RTB5.Text, "$help") - 1
RTB5.SelLength = Len("$help")
RTB5.SelColor = RGB(0, 90, 0)
RTB5.SelBold = True
RTB5.SelFontSize = 8
RTB5.SelStart = InStr(RTB5.Text, " $$ ") + 18
RTB5.SelLength = Len(" $$ ")
RTB5.SelColor = vbBlue
RTB5.SelBold = True
RTB5.SelFontSize = 8
RTB5.SelStart = InStr(RTB5.Text, "$fav") - 1
RTB5.SelLength = Len("$fav")
RTB5.SelColor = RGB(0, 90, 0)
RTB5.SelBold = True
RTB5.SelFontSize = 8
RTB5.SelStart = InStr(RTB5.Text, " $$ ") + 27
RTB5.SelLength = Len(" $$ ")
RTB5.SelColor = vbBlue
RTB5.SelBold = True
RTB5.SelFontSize = 8
RTB5.SelStart = InStr(RTB5.Text, "$addfav") - 1
RTB5.SelLength = Len("$addfav")
RTB5.SelColor = RGB(0, 90, 0)
RTB5.SelBold = True
RTB5.SelFontSize = 8
RTB5.SelStart = InStr(RTB5.Text, " $$ ") + 38
RTB5.SelLength = Len(" $$ ")
RTB5.SelColor = vbBlue
RTB5.SelBold = True
RTB5.SelFontSize = 8
RTB5.SelStart = InStr(RTB5.Text, "$delfav") - 1
RTB5.SelLength = Len("$delfav")
RTB5.SelColor = RGB(0, 90, 0)
RTB5.SelBold = True
RTB5.SelFontSize = 8
RTB5.SelStart = InStr(RTB5.Text, "::..") - 1
RTB5.SelLength = Len("::..")
RTB5.SelColor = vbBlack
RTB5.SelBold = True
RTB5.SelFontSize = 8
Call RoomSend(RTB5.TextRTF)
End Sub
The one thing that seemed tricky was the fact that I used double $$ between each command. I saw another bot pull this off once but I cant duplicate it. And the dude wont share the code. I tried several different combinations to this but this was the last attempt. I even tried having a with statement to select the whole line and make it bold and change fontsize to 8.
Any ideas or suggestions would be greatly appriciated.
intercepter_3




