• Welcome to Valhalla Legends Archive.
 

Problem With BNLS I am getting

Started by ChR0NiC, January 22, 2004, 05:38 AM

Previous topic - Next topic

ChR0NiC

I was using my bot, and I kept getting an error

Run Time Error '5':

Invalid procedure call or argument

So I tried Stealth Bot and the same thing happened so I opened up my source and tried to connect with it and it said.


Run Time Error '5':

Invalid procedure call or argument


And when it went to show me where the problem is it highlight


VersionStatstring = Mid(Data, 16, Len(Data) - 16)


So has there been any changes in BNLS or BNET that I am not aware of ?? Because if yes, I would like to know them ASAP, so I can make the changes on my bot. Thanks  ;D

iago

It sounds like one of the arguments in that statement is invalid.  Usually it's because you go over the end of an array or something.  Perhaps battle.net made a change to their statstrings?
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


ChR0NiC

that's what I was thinking......possibly bnet updated their statstring.....I was hoping maybe SkyWing or someone like iago could inform us of this change  ;D

Soul Taker

If that's what grabs the version from D2 statstrings, it's always caused errors on rare occasions in the popular VB statstring parsing code.  You could either handle the error or just get rid of that part.

ChR0NiC

I don't think it has to do with D2, cuz if I put a ' in front of it, it won't connect because of a invalid game version, so it has to do with the hashing part I believe.....

Arthas

   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)
         If BNET.Product = "PX2D" Or BNET.Product = "PX3W" Then
           With pBuffer
               .InsertDWORD &H0
               .InsertBYTE &H2
               .InsertDWORD &H1
               .InsertDWORD Servers
               .InsertNTString BNET.Cdkey
               .InsertNTString BNET.Cdkey2
               .SendBNLSPacket &HC
           End With
         Else
           With pBuffer
              .InsertDWORD Servers
              .InsertNTString BNET.Cdkey
              .SendBNLSPacket &H1
           End With
         End If


Mine is ExeInfo = Mid(data, 16, Len(data) - 16). I am getting the same problem. I assume BNLS is working properlly, yet there is a slight mishap with the documentation on the 0x9 packet now. Perhaps if we get an updated documentation, we could connect.

Besides, this is a VERY important packet we're dealing with here - it determines whether or not out CD keys get accepted or not 8-). For now, I'm stuck hashing on SC. But hey, oh well. 0x1E isnt THAT bad ;D.

Please Skywing help us out!

iago

"VersionStatstring" is a really bad name for that variable.  


And why would iago know?  I don't know much at all about making bots or battle.net.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Kp

Quote from: Arthas on January 22, 2004, 09:35 AM
For now, I'm stuck hashing on SC. But hey, oh well. 0x1E isnt THAT bad ;D.

Yes, it is.  Starcraft uses SID_AUTH_* (0x50 / 0x51 series) for CDkey verification, and has done so for a long time... :P
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Stealth

#8
The only currently documented source of runtime error 5 in StealthBot's current release occurs when the user's Windows Regional Settings are not set to US English or similar. I have yet to pinpoint the specific source of this, but because it's a language setting it must have something to do with the fact that I use GetSystemDefaultLangID and GetSystemDefaultLCID in 0x50.

Edit: Correction: I hadn't read my support forums before these. Many people had runtime error 5 -- Since this doesn't occur anymore I would assume that Skywing's recent BNLS fix repaired whatever the cause was.
- Stealth
Author of StealthBot

UserLoser.

Quote from: Stealth on January 22, 2004, 12:54 PM
The only currently documented source of runtime error 5 in StealthBot's current release occurs when the user's Windows Regional Settings are not set to US English or similar. I have yet to pinpoint the specific source of this, but because it's a language setting it must have something to do with the fact that I use GetSystemDefaultLangID and GetSystemDefaultLCID in 0x50.

Edit: Correction: I hadn't read my support forums before these. Many people had runtime error 5 -- Since this doesn't occur anymore I would assume that Skywing's recent BNLS fix repaired whatever the cause was.

If using Starcraft/Broodwar/Diablo II/Lord of Destruction you should use GetUserDefaultLangID and GetUserDefaultLCID