Guest Elijahph Posted January 12, 2005 Share Posted January 12, 2005 Sleep(3000) $RepeatWhile = 0 While $RepeatWhile <= 10 $coord = PixelSearch(130,205,640,538,0xA54119) If $coord[0] == 0 Then MsgBox (0, "" "Error") EndIf MouseClick("left", $coord[0], $coord[1]) $RepeatWhile = $RepeatWhile + 1 Sleep(5000) WEnd very small program but it keeps giving me errors on my coord If $coord[0] == 0... ^ it says it isn't an array. Link to comment Share on other sites More sharing options...
Wolvereness Posted January 12, 2005 Share Posted January 12, 2005 (edited) Sleep(3000)$RepeatWhile = 0While $RepeatWhile <= 10 $coord = PixelSearch(130,205,640,538,0xA54119)If $coord[0] == 0 Then MsgBox (0, "" "Error") EndIfMouseClick("left", $coord[0], $coord[1])$RepeatWhile = $RepeatWhile + 1Sleep(5000)WEndvery small program but it keeps giving me errors on my coord If $coord[0] == 0... ^it says it isn't an array.<{POST_SNAPBACK}>Instead of $coord[0] = 0 make it If @error Then MsgBox (0, "", "Error")In addition use a For/Next loop instead of While/WEnd Edited January 12, 2005 by Wolvereness Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote] Link to comment Share on other sites More sharing options...
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