Valhalla Legends Forums Archive | Battle.net Bot Development | winsock error capture help.

AuthorMessageTime
OuTLawZGoSu
I would lik,e to know what are the errors that winsock might give you.
I only identified 2 errors.

[code]

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

[/code]

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.
January 4, 2004, 8:26 PM
LoRd
Use Err.Description()
January 4, 2004, 9:10 PM
Stealth
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.
January 4, 2004, 11:07 PM
UserLoser.
If you're using mswinsck.ocx control, you shouldnt' have to use Err.Number or Err.Description - Your socket_Error() should look something like:

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

[/code]

Then you can just use Number, and Description
January 5, 2004, 12:44 AM
OuTLawZGoSu
@ Lord and Stealth: I know it would be easier to use err.description, but I just wanted to have something to do.
January 5, 2004, 6:53 PM
MesiaH
Or you could just use the Error Lookup tool included with visual studio.
January 7, 2004, 7:51 PM

Search