deef99 Posted September 15, 2009 Share Posted September 15, 2009 I get this error and I don't understand what the issue is: I:\VB\SiteChn.au3 (23) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:Case $array[4] = "U"Case ^ ERRORHere is the first line in $file: 8007019235,5890890,grc3,UI had a Msgbox and it does show the Array[4] does equal U...so what is the problem?Here is part of my code... $line = FileReadLine($file) If @error = -1 Then ExitLoop ;MsgBox(0, "Line read:", $line) $array = StringSplit($line,",");look to see if going live U or turn down DSelectCase $array[4] = "U" $vec = 200Case $array[4] = "D" $vec = 61EndSelect Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 15, 2009 Share Posted September 15, 2009 I get this error and I don't understand what the issue is: I:\VB\SiteChn.au3 (23) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: Case $array[4] = "U" Case ^ ERROR Here is the first line in $file: 8007019235,5890890,grc3,U I had a Msgbox and it does show the Array[4] does equal U...so what is the problem? Here is part of my code... $line = FileReadLine($file) If @error = -1 Then ExitLoop ;MsgBox(0, "Line read:", $line) $array = StringSplit($line,",") ;look to see if going live U or turn down D Select Case $array[4] = "U" $vec = 200 Case $array[4] = "D" $vec = 61 EndSelect There must be a typo or something in the actual script, because this works fine: $line = "8007019235,5890890,grc3,U" $array = StringSplit($line, ",") ;look to see if going live U or turn down D Select Case $array[4] = "U" $vec = 200 Case $array[4] = "D" $vec = 61 EndSelect ConsoleWrite("$vec = " & $vec & @LF) Can you post a demo script we can actually run that will show the problem? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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