Valhalla Legends Forums Archive | Battle.net Bot Development | BNLS Error.....

AuthorMessageTime
WinSocks
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.

[code]
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
[/code]

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??
August 29, 2003, 7:52 PM
UserLoser
i'm guessing the data is empty, or it isn't 16 characters in length, could be from horrible parsing upon recieving data
August 29, 2003, 8:30 PM
WinSocks
how would i got about makign sure that it's correct 16 character length?
August 29, 2003, 8:59 PM
Camel
Invalid length wont cause that error in VB. My guess is that 'data' hasn't been declared, or is not a string.
August 29, 2003, 9:51 PM
WinSocks
ByVal Data As String

i have it declared, if it was just that i would of figured that out long ago......
August 29, 2003, 11:35 PM
Camel
Well, if Data is a string, the only thing I can imagine that could cause that error is if exeinfo isn't a string.
August 30, 2003, 7:24 PM
Grok
[quote author=Camel link=board=17;threadid=2498;start=0#msg19464 date=1062193884]
Invalid length wont cause that error in VB. My guess is that 'data' hasn't been declared, or is not a string.
[/quote]

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."

August 30, 2003, 11:03 PM
Camel
[quote author=Grok link=board=17;threadid=2498;start=0#msg19550 date=1062284625]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?[/quote]

Lazy++
August 31, 2003, 1:32 AM
Arki
If your so lazy then why dont you just not waist peoples time and not post?
September 1, 2003, 8:48 PM

Search