Array variable has incorrect number of subscripts

Asked By 0 points N/A Posted on -
qa-featured

Hi,

When I open all the .lnk files in one directory this error appears and it doesn’t matter if I click Accept it doesn’t work. Is there an expert online that can help me please to fix this error ? Also please tell me how can I prevent this to appear in the future.

Thank you !

AutoIt Error

Line 1102 (File “C:Documents and settingsUsuarioMenuInicioPorgramsAccessoriosProbar Programas.exe”):

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

SHARE
Answered By 590495 points N/A #176856

Array variable has incorrect number of subscripts

qa-featured

I guess there is a problem with your script file particularly with the array. Check line 1102 in your script file to see the problem. Since the problem is with the array variables, check if your array has not exceeded the allowed maximum number of dimensions. Since arrays can be multidimensional, where you use multiple series of index numbers, it is only allowed to use up to 64 dimensions in an array.

Beyond that, you will probably have an error similar to this. If you want to use arrays in your script file, you need to define their bounds using the keywords Global, Static, or Local. For example, an array with two elements but none assigned, you should have:

  • Local $aArray1[2]

An array with five elements and all assigned, you should have:

  • Local $aArray[] = [8, 4, 5, 9, 1]

And an array with seven elements with only the first three assigned, you should have:

  • Local $aArray[7] = [3, 7.5, "string"]

Related Questions