Jump to content

Array error


Recommended Posts

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? :(

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.

Link to comment
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

Link to comment
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"

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...