Jump to content
Sign in to follow this  
eqpaisley

strange error with array

Recommended Posts

eqpaisley

Hi there and thanks for your time.  I'm running a scrip and, part of it, involves PixelSearch() - then clicking on the location the pixel was found.  Here's what I've got:

$coord = PixelSearch(368, 161, 1301, 679, 0x0DA2D8, 10)
$x = $coord[0]
$y = $coord[1]

MouseClick("left", $x, $y)

I've delcare them as Local variables AND as DIM in different verison of the script but the same thing happens.  The script runs fine and the function works, 3, 4, 5 times (its in a WHILE loop) then later in the looping it crashes with the error that $coord isn't an array.  Any thoughts why it works and then suddenly doesn't?

thanks!

 

 

Share this post


Link to post
Share on other sites
eqpaisley

Ahhhhh that must be it, must be the occassions where it doesn't find the color for some reason!  I'll check the error value, thanks much.

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  

×