Valhalla Legends Forums Archive | Battle.net Bot Development | RunTime 5 & cdkeys

AuthorMessageTime
CrAz3D
Everytime I try to logon with a voided/muted key I get RunTime '5'.

I decided it was most likely something I messed up in the code so I dug out an older version that used to allow voided/muted keys to login but I get the same error, did Battle.Net recently change something with these keys?...Maybe some new packet?
August 17, 2003, 6:04 PM
Maddox
Why don't you try debugging first?
August 18, 2003, 3:10 AM
Soul Taker
Gogo error handling.
August 18, 2003, 5:22 AM
Skywing
[quote author=Soul Taker link=board=17;threadid=2371;start=0#msg18596 date=1061184135]
Gogo error handling.
[/quote]
Note that this does not include the following:[code]On Error Resume Next[/code]
August 18, 2003, 1:01 PM
Soul Taker
[quote author=Skywing link=board=17;threadid=2371;start=0#msg18611 date=1061211674]
[quote author=Soul Taker link=board=17;threadid=2371;start=0#msg18596 date=1061184135]
Gogo error handling.
[/quote]
Note that this does not include the following:[code]On Error Resume Next[/code]
[/quote]
Of course not. That's not really error handling at all!
August 18, 2003, 2:54 PM
Skywing
[quote author=Soul Taker link=board=17;threadid=2371;start=0#msg18615 date=1061218489]
[quote author=Skywing link=board=17;threadid=2371;start=0#msg18611 date=1061211674]
[quote author=Soul Taker link=board=17;threadid=2371;start=0#msg18596 date=1061184135]
Gogo error handling.
[/quote]
Note that this does not include the following:[code]On Error Resume Next[/code]
[/quote]
Of course not. That's not really error handling at all!
[/quote]
Yes, but I've seen it far too many times in code snippets people paste here while asking for help.
August 18, 2003, 4:39 PM
CrAz3D
I've tried that, I'm not exactly sure what else I could put for the debuggin, I've made it MsgBox the error number & it's description, It's under the parse, I'm not sure exactly what is wrong, I'll go try & make it more specific.
August 18, 2003, 10:11 PM
DaRk-FeAnOr
Isnt RunTime error 5, "Index out of range"? Check your indexes :P
August 20, 2003, 8:01 AM
iago
The best way is to set a Breakpoint, then reproduce the problem.
August 20, 2003, 8:14 AM
Grok
[quote author=Skywing link=board=17;threadid=2371;start=0#msg18625 date=1061224783]
[quote author=Soul Taker link=board=17;threadid=2371;start=0#msg18615 date=1061218489]
[quote author=Skywing link=board=17;threadid=2371;start=0#msg18611 date=1061211674]
[quote author=Soul Taker link=board=17;threadid=2371;start=0#msg18596 date=1061184135]
Gogo error handling.
[/quote]
Note that this does not include the following:[code]On Error Resume Next[/code]
[/quote]
Of course not. That's not really error handling at all!
[/quote]
Yes, but I've seen it far too many times in code snippets people paste here while asking for help.
[/quote]

Oh why is this not error handling?

[code]On Error Resume Next 'next line breaks a lot, handle locally:
lRet = StupidObject.BrokenMethod( Param1, Param2 )
Select Case Err.Number
Case 0 'no error. first so code immediately continues
Case 5 'contingency for Invalid procedure call or argument
Case 9 'handle Subscript out of range
LogIt "MySub", "StupidObject.BrokenMethod", Erl, Err.Number, Err.Description
Case Else 'any other error is ok
GoTo MyAttachMethod2
End Select[/code]

"On Error Resume Next" is perfectly acceptable as a local error handler. It is not as useful as a procedural, module, or project-level error handler.
August 20, 2003, 11:25 AM
Skywing
[quote author=Grok link=board=17;threadid=2371;start=0#msg18758 date=1061378722]
Oh why is this not error handling?

[code]On Error Resume Next 'next line breaks a lot, handle locally:
lRet = StupidObject.BrokenMethod( Param1, Param2 )
Select Case Err.Number
Case 0 'no error. first so code immediately continues
Case 5 'contingency for Invalid procedure call or argument
Case 9 'handle Subscript out of range
LogIt "MySub", "StupidObject.BrokenMethod", Erl, Err.Number, Err.Description
Case Else 'any other error is ok
GoTo MyAttachMethod2
End Select[/code]

"On Error Resume Next" is perfectly acceptable as a local error handler. It is not as useful as a procedural, module, or project-level error handler.
[/quote]
I suppose there are a few limited cases where it might be acceptable to use it, but it's far overrused from what I can tell.
It also makes code harder to understand -- no well defined error handler parts -- and forgetting to unset Resume Next may cause annoying, hard-to-debug problems later on in the procedure. At least if you use a specific error handler label, it's obvious that an (unexpected) error happened, instead of it being "silently" ignored.
August 20, 2003, 1:06 PM
Adron
[quote author=Skywing link=board=17;threadid=2371;start=0#msg18760 date=1061384771]
I suppose there are a few limited cases where it might be acceptable to use it, but it's far overrused from what I can tell.
It also makes code harder to understand -- no well defined error handler parts -- and forgetting to unset Resume Next may cause annoying, hard-to-debug problems later on in the procedure. At least if you use a specific error handler label, it's obvious that an (unexpected) error happened, instead of it being "silently" ignored.
[/quote]

Actually I see On Error Resume Next as a rather nice way of handling errors - it makes VB work like VC. You get to check for errors in Err kind of like how you in VC check for errors in GetLastError()...

August 20, 2003, 4:07 PM
St0rm.iD
I'll offer to teach a compsci course for the good of the forum...

"VB Debugging 101"
August 24, 2003, 2:57 AM

Search