Jump to content

Recommended Posts

Posted

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

 

Posted

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?

Posted

@Cooler,

It's either the declared variable is beyond the maximum declared of  "$posarya[0] = $currXPos".

Programming is "To make it so simple that there are obviously no deficiencies" or "To make it so complicated that there are no obvious deficiencies" by C.A.R. Hoare.

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
  • Recently Browsing   0 members

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