Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: FrostWraith on May 21, 2006, 09:57 AM

Title: Why does line "occasionally" error
Post by: FrostWraith on May 21, 2006, 09:57 AM
Edit: Nvm, it happens every time

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

Error:
QuoteInvalid Procedure Call or Argument

I dont wanna handle it with just On Error Resume Next
Title: Re: Why does line "occasionally" error
Post by: raylu on May 21, 2006, 11:45 AM
Data is null?
Title: Re: Why does line "occasionally" error
Post by: Banana fanna fo fanna on May 21, 2006, 12:12 PM
You probably want to assert that len(data) >= 2