Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: OuTLawZGoSu on January 04, 2004, 02:26 PM

Title: winsock error capture help.
Post by: OuTLawZGoSu on January 04, 2004, 02:26 PM
I would lik,e to know what are the errors that winsock might give you.
I only identified 2 errors.



Private Sub winsock_Error (......)

Select Case err.Number
Case "10060"
AddC vbRed, " Connection timed out. Try to reconnect to the internet. "
Case "0"
AddC vbRed, " Unable to connect to Battle.net. You might be IPbanned. "
Case Else
AddC vbRed, " Unable to connect to Battle.net. "
End Select

end sub



The 0 comes when I am ipbanned. i need some more error numbers.
If anyone knows more, plz let me know.

And if there is something wrong with this code, also let know.
Title: Re:winsock error capture help.
Post by: Eric on January 04, 2004, 03:10 PM
Use Err.Description()
Title: Re:winsock error capture help.
Post by: Stealth on January 04, 2004, 05:07 PM
Also, Err.Number returns a numeric value, so you shouldn't use Case "10060" -- a string -- you should use simply Case 10060.

http://www.anzio.com/support/troubleshooting/winsockerrors.htm lists the Winsock error codes, but as LoRd said, it's easier to use Err.Description for this.
Title: Re:winsock error capture help.
Post by: UserLoser. on January 04, 2004, 06:44 PM
If you're using mswinsck.ocx control, you shouldnt' have to use Err.Number or Err.Description - Your socket_Error() should look something like:


Private Sub sckWar3ATGameHost_Error(Index As Integer, ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)



Then you can just use Number, and Description
Title: Re:winsock error capture help.
Post by: OuTLawZGoSu on January 05, 2004, 12:53 PM
@ Lord and Stealth: I know it would be easier to use err.description, but I just wanted to have something to do.
Title: Re:winsock error capture help.
Post by: Mesiah / haiseM on January 07, 2004, 01:51 PM
Or you could just use the Error Lookup tool included with visual studio.