Jump to content

array problem


Recommended Posts

I have this bit of code

Global $properties[1][4]
Global $i
Global $x[1][100]
$x[$i] = $properties[0][0]
and autoit returns an error

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

It was referring to the x and i. I was wondering is anyone could see why? i just want to have x1,x2,x3 and so on. I dont know i figure its probably something stupid that im missing but i was unable to to find anything in the help file

DarkNecroancer

Edited by DarkNecromancer
Link to comment
Share on other sites

I dont know i figure its probably something stupid that im missing

Actually. You make two-dimentional array $x[1][100] and then use it as one-dimentional: $x[$i].

Btw, why you use 1 in the first subscript? It's looks senseless until you not plan to ReDim-ing this. If as you say you just want x1,x2,x3, you enough to have one-dim array:

Global $x[100]

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