Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: WinSocks on August 29, 2003, 02:52 PM

Title: BNLS Error.....
Post by: WinSocks on August 29, 2003, 02:52 PM
I did a search to see if there was any posts about what i'm having a problem with and it didn't help me very much.


   Case &H9
       version = Val("&H" & StrToHex(StrReverse(Mid(Data, 8, 4))))
       version = CLng(version)
       Checksum = Val("&H" & StrToHex(StrReverse(Mid(Data, 12, 4))))
       Checksum = CLng(Checksum)
       exeinfo = Mid(Data, 16, Len(Data) - 16)  <----- Error (Invalid Procedure call or argument)
         If BNet.Product = "PX2D" Then
           With PB
               .InsertDWORD &H0
               .InsertbYTE &H2
               .InsertDWORD &H1
               .InsertDWORD servers
               .InsertNTString BNet.Cdkey
               .InsertNTString BNet.Cdkey2
               .SendBNLSPacket &HC
           End With
         Else
           With PB
              .InsertDWORD servers
              .InsertNTString BNet.Cdkey
              .SendBNLSPacket &H1
           End With
         End If


If anyone can make it plain and simple why it does that... i look at other sources with bnls parsing and there isn't anything different......

i declared ExeInfo already...... and i been trying to get help from my friends and they can't figure it out either.

could i possibly be missing something?? or have unessessary code??
Title: Re:BNLS Error.....
Post by: UserLoser on August 29, 2003, 03:30 PM
i'm guessing the data is empty, or it isn't 16 characters in length, could be from horrible parsing upon recieving data
Title: Re:BNLS Error.....
Post by: WinSocks on August 29, 2003, 03:59 PM
how would i got about makign sure that it's correct 16 character length?
Title: Re:BNLS Error.....
Post by: Camel on August 29, 2003, 04:51 PM
Invalid length wont cause that error in VB. My guess is that 'data' hasn't been declared, or is not a string.
Title: Re:BNLS Error.....
Post by: WinSocks on August 29, 2003, 06:35 PM
ByVal Data As String

i have it declared, if it was just that i would of figured that out long ago......
Title: Re:BNLS Error.....
Post by: Camel on August 30, 2003, 02:24 PM
Well, if Data is a string, the only thing I can imagine that could cause that error is if exeinfo isn't a string.
Title: Re:BNLS Error.....
Post by: Grok on August 30, 2003, 06:03 PM
Quote from: Camel on August 29, 2003, 04:51 PM
Invalid length wont cause that error in VB. My guess is that 'data' hasn't been declared, or is not a string.

Camel, about 90% of your posts are nothing but guesses.  If you're going to attempt to help someone, how about actually opening up VB and testing what you're saying?

The answer posted by UserLoser is correct.  When the length of data is less than 16 and used in that Mid() function, VB raises error 5, "invalid procedure call or argument."

Title: Re:BNLS Error.....
Post by: Camel on August 30, 2003, 08:32 PM
Quote from: Grok on August 30, 2003, 06:03 PMCamel, about 90% of your posts are nothing but guesses.  If you're going to attempt to help someone, how about actually opening up VB and testing what you're saying?

Lazy++
Title: Re:BNLS Error.....
Post by: Arki on September 01, 2003, 03:48 PM
If your so lazy then why dont you just not waist peoples time and not post?