Valhalla Legends Forums Archive | Visual Basic Programming | Why does line "occasionally" error

AuthorMessageTime
FrostWraith
Edit: Nvm, it happens every time

This code does not error everytime, but very sporadically. This line handles untouched data through winsock.
[code]PID = Asc(Mid(Data, 2, 1))[/code]

Error:
[quote]Invalid Procedure Call or Argument[/quote]

I dont wanna handle it with just On Error Resume Next
May 21, 2006, 2:57 PM
raylu
Data is null?
May 21, 2006, 4:45 PM
St0rm.iD
You probably want to assert that len(data) >= 2
May 21, 2006, 5:12 PM

Search