Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: CrAz3D on October 07, 2004, 08:29 PM

Title: Mismatch!?
Post by: CrAz3D on October 07, 2004, 08:29 PM
VB.NET:
Public Function PlugEvent(ByVal TheEvent As String, Optional ByVal Username As String = vbNullString, Optional ByVal Message As String = vbNullString, Optional ByVal Flags As Integer = vbNull, Optional ByVal Ping As Integer = vbNull) As Boolean
Dim d() As String, TheBool() As Boolean
        ReDim TheBool(0)
TheBool(UBound(TheBool)) = PlugY(i).Run(TheEvent, Username, Message, Flags, Ping)


VB6:Public Function Run(ByVal TheEvent As String, Optional Username As String, Optional Message As String, Optional Flags As Integer, Optional Ping As Integer) As Boolean

VB.NET:PlugEvent("metalk", "CrAz3D", "hi", 2, 3)

Everytime that I send the Flags & Ping I recieve a Type Mismatch, any problems visible to y'all?

The Run function exsists in another project.
Title: Re: Mismatch!?
Post by: Banana fanna fo fanna on October 07, 2004, 09:04 PM
vbNull being assigned to an integer?
Title: Re: Mismatch!?
Post by: CrAz3D on October 07, 2004, 09:36 PM
That should work, no?
Title: Re: Mismatch!?
Post by: UserLoser. on October 07, 2004, 09:48 PM
Quote from: CrAz3D on October 07, 2004, 09:36 PM
That should work, no?

If it doesn't work, then no
Title: Re: Mismatch!?
Post by: CrAz3D on October 07, 2004, 10:25 PM
My problem is that whatever value I end up using for flags/ping isn't/can't be passed as an integer...only a string, as I've come to realize.

New problem is that the Host form (vb.net project) cannot load a modal form from my vb6 project (the plugin).   .Net is so lovely
Title: Re: Mismatch!?
Post by: drivehappy on October 08, 2004, 02:11 AM
Quote from: CrAz3D on October 07, 2004, 10:25 PM
My problem is that whatever value I end up using for flags/ping isn't/can't be passed as an integer...only a string, as I've come to realize.
Then why are they defined as integers?

Quote
New problem is that the Host form (vb.net project) cannot load a modal form from my vb6 project (the plugin).   .Net is so lovely
What are you trying to do?