Sign in to follow this  
Followers 0
ArmandoXS

Array error

56 posts in this topic

Here is a piece of a program im making:

If Not @error Then

$timer=TimerInit()

$cord=PixelSearch(133,103,888,656,0xA58A29,10,10)

MouseClick("left",$cord[1],$cord[2],1,1)

Sleep(12000)

The error is, ==> Subscript used with non-Array variable.:

MouseClick("left",$cord[1],$cord[2],1,1)

MouseClick("left",$cord^ ERROR

Any way i can fix or get around this problem? :(

Share this post


Link to post
Share on other sites



Add error checking for PixelSearch().


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Add error checking for PixelSearch().

error checking????

Share this post


Link to post
Share on other sites

I was kidding.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

I was kidding.

umm.... ok.....

Share this post


Link to post
Share on other sites

I was lying.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

kidding, lol

DarkDragon Icon, you cant possibly not know what error checking is, as you clearly have it in your code already for some absent psrt of your script.

There are a number of ways to check for an error with that function, even in the helpfile documentation for the function believe it or not.

@error

or you can look at IsArray()


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

kidding, lol

DarkDragon Icon, you cant possibly not know what error checking is, as you clearly have it in your code already for some absent psrt of your script.

There are a number of ways to check for an error with that function, even in the helpfile documentation for the function believe it or not.

@error

or you can look at IsArray()

Sweet talker.

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

kidding, lol

DarkDragon Icon, you cant possibly not know what error checking is, as you clearly have it in your code already for some absent psrt of your script.

There are a number of ways to check for an error with that function, even in the helpfile documentation for the function believe it or not.

@error

or you can look at IsArray()

Still a little fuzzy on that answer but ill look in the

"help file documentation"

Share this post


Link to post
Share on other sites

If you can please provide a link, when i said i was a little fuzzy i meant i was completly confused

Share this post


Link to post
Share on other sites

In the cose you posted, what does this do ? "If Not @error Then" ?

theres another pixelsearch command before the code i provided

Share this post


Link to post
Share on other sites

Ok, so how is the next pixelsearch any different ?

i have no idea but if u need me to post the whole code i can

Share this post


Link to post
Share on other sites

No, thats OK, I just want you to click what you're being told, i'tt be better in the long run.

??????

anyway do you have a link for the place where i can find information on where i can get help

Share this post


Link to post
Share on other sites

??????

anyway do you have a link for the place where i can find information on where i can get help

Wait, wait...

What exactly you want link for?


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Wait, wait...

What exactly you want link for?

JohnOne talked about something in the help file documentation

Share this post


Link to post
Share on other sites

Lets go back a little and see if you can answer the question a little better.

In the code you posted, what does this do ? "If Not @error Then" ?

I know you said there is a pixel search ealier in the code , but can you tell me whay you have that line, and what it does ?


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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  
Followers 0