Wb-FreeKill Posted March 6, 2005 Posted March 6, 2005 Every time i quit the server, the client gives me this error: If $ret[2]=~~rejected" Then If $ret^ ERROR Error: Subscript used with non-Array variable $ret = DLLCall("au3xtra.dll","int","TCPRecv", "int", $socket, "str", "", "int", 512 ) If $ret[2] = "~~rejected" Then Sleep(2000) DLLCall("au3xtra.dll", "int", "TCPSend", "int", $socket, "str", "~~whatever") ExitLoop ElseIf $ret[2] = "~~bye" Then Sleep(2000) ExitLoop EndIf
Pickled Posted March 6, 2005 Posted March 6, 2005 (edited) Error: Subscript used with non-Array variable$ret failed to recieve the Array!"If the function call fails then @error is set to 1."How to safely apply array returning functions with AutoIT$ret = DllCall("au3xtra.dll","int","TCPRecv", "int", $socket, "str", "", "int", 512 ) If(@error <> 1) Then ;Success of DllCall If $ret[2] = "~~reject....... Else ;DllCall failed to assign $ret to array ($ret = nonarray!) ..... EndIf Edited March 6, 2005 by Pickled
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now