Valhalla Legends Forums Archive | Battle.net Bot Development | [VB6] CleanSlateBot - subscript out of range

AuthorMessageTime
TangoFour
Greetings,

I've been lurking this forum for quite a while now, and recently started working on a bot with VB, using the CleanSlateBot2 OCX control. After several unsuccesful attempts (due to me not knowing the proper number for the Accept field), my bot is now able to sign in as a WarCraft 3 Client.

The problem is staying signed in - because at the moment I receive the 0x0A (logged in as) packet, an error pops up, titled CSBOXC (in other words: CleanSlateBot) stating SubScript out of Range - error 9.

My code for the LoggedOnAs event is never executed - though my bot does appear in the channel for the duration of the error (if I click it away, it signs off)

I've also added some code to the UnhandledPackets event, which determined that the packet received before 0x0A (being 0x75 - Clan Info) doesn't cause any errors.

So, does anyone have an idea what I'm doing wrong? I can post code if needed
July 11, 2004, 11:06 AM
______
There is nothing your doing wrong, you dont need to post code, that happens within the ocx itself.
July 11, 2004, 3:04 PM
BinaryzL
[quote author=TangoFour link=board=17;threadid=7656;start=0#msg69677 date=1089543973]
Greetings,

I've been lurking this forum for quite a while now, and recently started working on a bot with VB, using the CleanSlateBot2 OCX control. After several unsuccesful attempts (due to me not knowing the proper number for the Accept field), my bot is now able to sign in as a WarCraft 3 Client.

The problem is staying signed in - because at the moment I receive the 0x0A (logged in as) packet, an error pops up, titled CSBOXC (in other words: CleanSlateBot) stating SubScript out of Range - error 9.

My code for the LoggedOnAs event is never executed - though my bot does appear in the channel for the duration of the error (if I click it away, it signs off)

I've also added some code to the UnhandledPackets event, which determined that the packet received before 0x0A (being 0x75 - Clan Info) doesn't cause any errors.

So, does anyone have an idea what I'm doing wrong? I can post code if needed
[/quote]

Poorly error prevention coding (in this case some array error) on the OCX's authors part.
July 11, 2004, 3:18 PM
TangoFour
So, is there any way to work around it...?
July 11, 2004, 7:20 PM
ChR0NiC
[quote author=TangoFour link=board=17;threadid=7656;start=0#msg69750 date=1089573622]
So, is there any way to work around it...?
[/quote]

Parse the W3 yourself so that you don't have to use CSB for it.
Then CSB will never do this to you again :P
July 11, 2004, 7:21 PM
TangoFour
Great, no fix, just my luck - I guess this'll take longer than anticipated - oh well, I'll solve it eventually...
July 11, 2004, 9:21 PM
ChR0NiC
[quote author=TangoFour link=board=17;threadid=7656;start=0#msg69793 date=1089580917]
Great, no fix, just my luck - I guess this'll take longer than anticipated - oh well, I'll solve it eventually...
[/quote]

Sorry man, but it seems that...you cannot edit an OCX without it's source. And since I am sure you do not know ASM, you should just work around it.
July 11, 2004, 11:08 PM
TangoFour
Well, I have worked with a few simple assembly languages a few times, but I'm guessing that's not the kind you're hinting at.

Still, it shouldn't be that hard for me to make my own login code that utilizes BNLS to log into Battle.net.

At least, so I hope

Thanks for your help though
July 11, 2004, 11:12 PM
ChR0NiC
The reason I was talking about ASM, is that there are many disassemblers out there you can use to convert the program into ASM code. You can easily find them on Google. Sorry I couldn't be more help.
July 11, 2004, 11:16 PM
TangoFour
Thought so - and you're right, I don't have the knowledge to comprehend what the disassembler throws at me.

I do have quite a bit of programming knowledge in languages other than Visual Basic - but I'm doing this in VB because I'm interested in learning how it works.

Still, I first need to find out how the WarCraft 3 Login Sequence works... I've checked with bnetdocs but it doesn't say, or I'm looking wrong...

Does anyone know if there are any documents describing this?
July 11, 2004, 11:34 PM
Adron
I think the BNLS documents will help you.
July 12, 2004, 12:31 AM
BinaryzL
[quote author=TangoFour link=board=17;threadid=7656;start=0#msg69829 date=1089588891]
Thought so - and you're right, I don't have the knowledge to comprehend what the disassembler throws at me.

I do have quite a bit of programming knowledge in languages other than Visual Basic - but I'm doing this in VB because I'm interested in learning how it works.

Still, I first need to find out how the WarCraft 3 Login Sequence works... I've checked with bnetdocs but it doesn't say, or I'm looking wrong...

Does anyone know if there are any documents describing this?
[/quote]

This could help with the BNLS stuff.

(Each packet information starts about 1/3 the way down)
http://www.valhallalegends.com/yoni/BNLSProtocolSpec.txt
July 12, 2004, 12:41 AM
hismajesty
Since when does CSBs support of War3 work?
July 12, 2004, 1:09 AM
ChR0NiC
[quote author=hismajesty[yL] link=board=17;threadid=7656;start=0#msg69852 date=1089594542]
Since when does CSBs support of War3 work?
[/quote]

I am not 100% sure about this, but I believe Cuphead did release one update of CSB a while before he left and it had W3 support in it. But I believe this was rushed and it has many bugs (or so I am told)
July 12, 2004, 1:32 AM
l3alla
Tango, our you using GetStuff code? If so then make sure the info you put in your source is the same in config.ini. for ex

[code]GetStuff("Da`BoT", "User")[/code]
Make sure Da`BoT is in your config ex.
[Da`BoT]
Username=BLAH
Password=BLAH an so on
Hope this maby helps
July 12, 2004, 1:52 AM
PaiD
[quote author=l3alla link=board=17;threadid=7656;start=0#msg69871 date=1089597127]
Tango, our you using GetStuff code? If so then make sure the info you put in your source is the same in config.ini. for ex

[code]GetStuff("Da`BoT", "User")[/code]
Make sure Da`BoT is in your config ex.
[Da`BoT]
Username=BLAH
Password=BLAH an so on
Hope this maby helps
[/quote]

if he used that, he would need to do GetStuff("Da`BoT", "Username")
July 12, 2004, 1:55 AM
ChR0NiC
[quote author=l3alla link=board=17;threadid=7656;start=0#msg69871 date=1089597127]
Tango, our you using GetStuff code? If so then make sure the info you put in your source is the same in config.ini. for ex

[code]GetStuff("Da`BoT", "User")[/code]
Make sure Da`BoT is in your config ex.
[Da`BoT]
Username=BLAH
Password=BLAH an so on
Hope this maby helps
[/quote]

Um........he got Run Time Error 9 which means Subscript out of range, meaning the CSB is trying to access an array index which has not been set. So, thanks for your suggestions, but that has absolutely nothing to do with anything.
July 12, 2004, 2:22 AM
PaiD
I know it has nothing do to with his problem but if he did want to use your idea he might want to have it error free
July 12, 2004, 2:41 AM
BinaryzL
[quote author=ChR0NiC link=board=17;threadid=7656;start=15#msg69880 date=1089598942]
[quote author=l3alla link=board=17;threadid=7656;start=0#msg69871 date=1089597127]
Tango, our you using GetStuff code? If so then make sure the info you put in your source is the same in config.ini. for ex

[code]GetStuff("Da`BoT", "User")[/code]
Make sure Da`BoT is in your config ex.
[Da`BoT]
Username=BLAH
Password=BLAH an so on
Hope this maby helps
[/quote]

Um........he got Run Time Error 9 which means Subscript out of range, meaning the CSB is trying to access an array index which has not been set. So, thanks for your suggestions, but that has absolutely nothing to do with anything.
[/quote]

If you read what duel said maybe you wouldn't be writting this..
July 12, 2004, 3:14 AM
TangoFour
Thank you for your replies - the GetStuff code hasn't given me problems so far, so I'd like to think that's a done deal

I've also found a bit of information about the Login Sequence in another post, I'll work from there.
July 12, 2004, 9:43 AM
TangoFour
Ok, I'm facing a bit of a dilemma here...

I'm currently in the process of writing a BNLS-based Battle.net bot in VB from scratch, however, since I'm new to VB, this isn't exactly going perfectly.

While working, I created a little program in Java to test the stuff my bot sends out, and while doing so, I realised I can just as easily make the bot in Java, since I'm far more experienced with that language.

So here's the dilemma:
_ Do I switch to Java due to better understanding of the language and greater chance of succes?
_ Do I continue with VB for the learning opportunity?

Your opinion please
July 13, 2004, 10:35 PM
ChR0NiC
Do it in Java, Visual Basic is a language that will corrupt you. If you need some example bot projects in Java ask iago, and I'm sure he will help you out.
July 13, 2004, 10:53 PM
Myndfyr
[quote author=TangoFour link=board=17;threadid=7656;start=15#msg70245 date=1089758156]
Ok, I'm facing a bit of a dilemma here...

I'm currently in the process of writing a BNLS-based Battle.net bot in VB from scratch, however, since I'm new to VB, this isn't exactly going perfectly.

While working, I created a little program in Java to test the stuff my bot sends out, and while doing so, I realised I can just as easily make the bot in Java, since I'm far more experienced with that language.

So here's the dilemma:
_ Do I switch to Java due to better understanding of the language and greater chance of succes?
_ Do I continue with VB for the learning opportunity?

Your opinion please
[/quote]

Let me answer for iago before he sees this:

Go Java! Go Java!

(eww I feel dirty now).

But Java > VB. ;)
July 13, 2004, 10:53 PM

Search