daniel02 Posted September 30, 2009 Share Posted September 30, 2009 (edited) Hi all, I am looking for a certain pixel to determine if I am moving in a game or not. As sometimes the pixel is missed I want to check it several times. For that I did a while true count until my variable $checkount is greater than 5. Also the pixelsearch is working the variable is allways 1. I have tested this with the MsgBox. So my while -- wend never ends.. But I do not understand why Any thoughts? Thanks Daniel Func checkmove() $checkcount = 0 While $checkcount < 5 $xposplus = $pos[0] + 110 $bottom = $pos[1] -152 $top = $pos[1] - 177 $coord = PixelSearch($pos[0], $top, $xposplus, $bottom, 0xC6C4C2, 0, 1, "prog1") ; if pixel not found we do not move If @error Then $chekcount = $checkcount +1 sleep(100) MsgBox(0, "Checkcount", $chekcount) EndIf WEnd MsgBox(0, "YOU ARE NOT MOVING") EndFunc Edited September 30, 2009 by daniel02 Link to comment Share on other sites More sharing options...
daniel02 Posted September 30, 2009 Author Share Posted September 30, 2009 Hi, I found the error. This post can be closed. Thanks Daniel 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