qaravi Posted October 15, 2007 Share Posted October 15, 2007 how can i solve the following error? Array variable has incorrect number of subscripts or subscript dimension range exceeded.: did i make mistake in declaring the array thanks in advance ravi_qa Link to comment Share on other sites More sharing options...
GaryFrost Posted October 15, 2007 Share Posted October 15, 2007 how can i solve the following error? Array variable has incorrect number of subscripts or subscript dimension range exceeded.: did i make mistake in declaring the arraythanks in advanceravi_qaCrystal ball says: "Maybe"Hard to say where the mistake is with out a script to look at. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
SadBunny Posted October 15, 2007 Share Posted October 15, 2007 how can i solve the following error? Array variable has incorrect number of subscripts or subscript dimension range exceeded.: did i make mistake in declaring the array thanks in advance ravi_qa This error means you are trying to access an array element that has not been created (yet). For instance, when you Dim $a[10] and then try to ConsoleWrite($a[10]) (or even higher than 10 ofcourse), you will get that error message. Important to know is that Dim $a[10] created an array $a with EXACTLY TEN elements, running from ZERO to NINE. Meaning: there is NO tenth element in this case; you would need an array with 11 elements for that. This concept is called 0-based arrays (also called the 0-beast), and confusion about it is 9 out of 10 times the reason for this error. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
wolf9228 Posted October 15, 2007 Share Posted October 15, 2007 how can i solve the following error? Array variable has incorrect number of subscripts or subscript dimension range exceeded.: did i make mistake in declaring the array thanks in advance ravi_qa #include <Array.au3> dim $avArray[1] _ArrayDisplay($avArray, "_ArrayDisplay() Test") $sValue = 1 ReDim $avArray[UBound($avArray) + 1] $avArray[UBound($avArray) - 1] = $sValue _ArrayDisplay($avArray, "_ArrayDisplay() Test") $sValue = 2 ReDim $avArray[UBound($avArray) + 1] $avArray[UBound($avArray) - 1] = $sValue _ArrayDisplay($avArray, "_ArrayDisplay() Test") $sValue = 3 ReDim $avArray[UBound($avArray) + 1] $avArray[UBound($avArray) - 1] = $sValue _ArrayDisplay($avArray, "_ArrayDisplay() Test") $sValue = 4 ReDim $avArray[UBound($avArray) + 1] $avArray[UBound($avArray) - 1] = $sValue _ArrayDisplay($avArray, "_ArrayDisplay() Test") صرح السماء كان هنا Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now