Jump to content

Array variable subscript Error?


GregP
 Share

Recommended Posts

Getting the following error:

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

$FolderData[$FDCounter]=$SourceFunc & "\" & $file

The array is defined as follows:

Dim $FileCounter, $Source, $Destination, $FileData[600][2], $FolderData[50], $searchFileSUB

I essentially took a working script and changed the source location of the files that are being loaded into the array. I've tried increasing the size of $FolderData. Any ideas on what is happening here?

Thanks

Link to comment
Share on other sites

  • Developers

Getting the following error:

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

$FolderData[$FDCounter]=$SourceFunc & "\" & $file

The array is defined as follows:

Dim $FileCounter, $Source, $Destination, $FileData[600][2], $FolderData[50], $searchFileSUB

I essentially took a working script and changed the source location of the files that are being loaded into the array.  I've tried increasing the size of $FolderData.  Any ideas on what is happening here?

Thanks

<{POST_SNAPBACK}>

What is the value of $FDCounter when this error occurs ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Getting the following error:

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

$FolderData[$FDCounter]=$SourceFunc & "\" & $file

The array is defined as follows:

Dim $FileCounter, $Source, $Destination, $FileData[600][2], $FolderData[50], $searchFileSUB

I essentially took a working script and changed the source location of the files that are being loaded into the array.  I've tried increasing the size of $FolderData.  Any ideas on what is happening here?

Thanks

<{POST_SNAPBACK}>

do you have a check in place to make sure that in your loop, $FDCounter never exceeds 49?
Link to comment
Share on other sites

  • 1 month later...

Hi,

I'm Getting the same error even with this simple script:

Dim $testarray[64][9]

For $x = 0 to 64

For $y = 0 to 9

$testarray[$x][$y] = $x + $y + 1

MsgBox(0, "TEST", "Element " & $x & "x" & $y & " is " & $testarray[$x][$y], 2)

Next

Next

As soon as it reaches element $testarray[0][9] which sould get the value "10" it exits with the same error.

Deefburgerwww.deefburger.com

Link to comment
Share on other sites

Hi,

I'm Getting the same error even with this simple script:

Dim $testarray[64][9]

For $x = 0 to 64

For $y = 0 to 9

$testarray[$x][$y] = $x + $y + 1

MsgBox(0, "TEST", "Element " & $x & "x" & $y & " is " & $testarray[$x][$y], 2)

Next

Next

As soon as it reaches element $testarray[0][9] which sould get the value "10" it exits with the same error.

It should never reach 9 because array has 64 by 9 elements and element index starts at 0.

So $testarray[63][8] is the max index.

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