Jump to content
Sign in to follow this  
GregP

Array variable subscript Error?

Recommended Posts

GregP

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

Share this post


Link to post
Share on other sites
Jos

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 ?

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
seandisanti

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?

Share this post


Link to post
Share on other sites
GregP

do you have a check in place to make sure that in your loop, $FDCounter never exceeds 49?

<{POST_SNAPBACK}>

The $FDCounter - is at 0 when it gets the first error and never exceeds 47.

Share this post


Link to post
Share on other sites
deefburger

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

Share this post


Link to post
Share on other sites
is8591

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.

Share this post


Link to post
Share on other sites
deefburger

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.

UUUUUG!

Some times the Obvious is so obscure!

Thanks


Deefburgerwww.deefburger.com

Share this post


Link to post
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
Sign in to follow this  

×