Jump to content
Sign in to follow this  
Dragon Edit

Pixelsearch Blows My Mind

Recommended Posts

Dragon Edit

I'm trying to do this...

$k = 1




If Pixel Search is TRUE Then

$k = 2


Until $k =2

Heres my question...how can I tell it if the PixelSearch was true or not?

I could swap it around and say "If pixel search not true Then...." But kinda lost here.

Share this post

Link to post
Share on other sites

Pixel search simply records coordinates...


If you want to know whether it found the pixel or not, do this:

if @error = 1 THEN;If script recieves an error (pixel not found) execut code here:

Basically, you use @error, to check if there was an error, 0 for none, 1 for an error

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post

Link to post
Share on other sites
Guest Zeliard2000

Also the @error variable is reset after any other function is called. So its probably better if you saved the @error value in a different variable right after calling the PixelSearch function.


PixelSearch(14, 20, 50, 100, color)

$error = @error

You probably already know this, but it took me forever to figure out that the @error variable kept reseting.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.