What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » My new command isn't being recognized (VB6)

My new command isn't being recognized (VB6)
Author: Message:
NanakiXIII
New Member
*

Avatar

Posts: 8
34 / Male / –
Joined: May 2003
O.P. My new command isn't being recognized (VB6)
I'm just learning a bit about writing plugins for MsgPlus in VB6 and I've been trying to write one that just adds one command, but my command isn't recognized and doesn't appear in the list that appears when you just press "/" in a conversation window. My plugin is loaded and checked in the MsgPlus preferences, so the problem must be in my coding. I just have no idea what I'm doing wrong.

I have the two modules loaded into my project and my own module looks like this:

code:
Public Function Initialize(ByVal nVersion As Long, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
    Initialize = True
End Function

Public Function ParseCommand(ByVal sCommand As String, ByVal sCommandArg As String, ByVal oConversationWnd As Object, ByRef sResult As String) As Boolean
If (StrComp(LCase(sCommand), "/xphobia", vbTextCompare) = 0) Then
    Dim PhobiaFile As String
    Dim Phobias() As String
    Dim RandomPhobia As String
    Open "E:\My Documents\phobialist.txt" For Input As #1
        PhobiaFile = Input(LOF(1), 1)
    Close #1
    Phobias = Split(PhobiaFile, vbNewLine)
    Randomize
    RandomPhobia = Phobias(Fix((UBound(Phobias) + 1) * Rnd))
    sResult = RandomPhobia
    ParseCommand = True
    Exit Function
End If
ParseCommand = False
End Function


It's supposed to pull up a file and send back a random line from it. That part works. I'm probably just missing something stupid because I've never done this before. Any help would be appreciated.
07-08-2005 07:57 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
My new command isn't being recognized (VB6) - by NanakiXIII on 07-08-2005 at 07:57 PM
RE: My new command isn't being recognized (VB6) - by Dempsey on 07-08-2005 at 08:00 PM
RE: My new command isn't being recognized (VB6) - by TheBlasphemer on 07-08-2005 at 08:47 PM
RE: My new command isn't being recognized (VB6) - by RaceProUK on 07-08-2005 at 09:24 PM
RE: My new command isn't being recognized (VB6) - by NanakiXIII on 07-08-2005 at 09:40 PM
RE: My new command isn't being recognized (VB6) - by Mike on 07-09-2005 at 05:35 AM
RE: My new command isn't being recognized (VB6) - by NanakiXIII on 07-09-2005 at 09:18 AM
RE: My new command isn't being recognized (VB6) - by Mnjul on 07-09-2005 at 09:28 AM
RE: My new command isn't being recognized (VB6) - by NanakiXIII on 07-09-2005 at 10:06 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On