Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: CrAz3D on September 20, 2004, 08:37 PM

Title: No carry through... ewwy
Post by: CrAz3D on September 20, 2004, 08:37 PM
If KeyAscii = 13 Then
   If Left(txtSend.text, 1) = "\" Then
       CS.DoCommands intAccess, CurrentUser, txtSend.text, False
       txtSend.text = ""
       KeyAscii = 0
   Else
       If PL.PlugEvent("metalk", CurrentUser, txtSend.text) = False Then
           Queue.AddQueue txtSend.text
       End If
       txtSend.text = ""
       KeyAscii = 0
   End If
End If


In my Plugin I set Run = True, that way it doesn't send text to BNET.

Case "metalk"       '//This is the event called when YOU say something
       If LCase(Left(Message, 9)) = "/showseen" Then
           Form1.Show
           Run = True
       End If


For some reason it isn't carrying over, any ideas?
Title: Re:No carry through... ewwy
Post by: UserLoser. on September 22, 2004, 02:08 PM
Are you moving the value of Run to PlugEvent at the end of that function?

This may not be related to your problem, but usually don't you check for Left(txtSend.Text, 1) = "/" for running local commands?
Title: Re:No carry through... ewwy
Post by: Grok on September 22, 2004, 02:36 PM
I saw the same thing, but there is not enough code to either figure out his intentions.  I have only a vague idea what "carrying over" means without better context.
Title: Re:No carry through... ewwy
Post by: CrAz3D on September 22, 2004, 05:44 PM
I figured out my problem.  I was checking multiple objects, all of which return a value for their own specific Run function.  Not all were returning true so it canceled out...I just did a little check to see if any of the Runs = true then if only 1 was true, the PlugEvent became true also.