Jump to content

Array variable has incorrect number of subscripts or subscript dimension range exceeded.:


 Share

Recommended Posts

Hi,

Here am trying to assign the mouse position to an dynamic array.

Am getting error as [ Array variable has incorrect number of subscripts or subscript dimension range exceeded.: ]

don't know where I missed. Suggestion..!

 

Error:

"C:\Desktop\array.au3" : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$posarya[0] = $currXPos
^ ERROR
>Exit code: 1    Time: 12.05

 

$currXPos = 20
$currYPos = 30
;  Create blank array
Global $posarya[UBound($i)]
Global $posaryb[UBound($j)]
$i =0
$j =0


For $i = 0 to 4 ;Ubound($Data)-1
MouseMove($currXPos,$currYPos)
$posarya[$i] = $currXPos
$posaryb[$j] = $currYPos
$currXPos = ($currXPos+10)
$currYPos = ($currYPos+10)
Next

 

Link to comment
Share on other sites

So, I assume there is code above the $posarya and b declarations not shown in what you posted...

Are $i and $j valid arrays with at least 1 element before you zero them?

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...