Kip Posted May 16, 2007 Posted May 16, 2007 (edited) There is a error, and I dont know where he is (because the output will only show this:) C:\PROGRA~1\AutoIt3\Include\array.au3 (496) : ==> Array variable subscript badly formatted.: $iResult = StringInStr($avArray[$iCurrentPos], $vWhat2Find, $iCaseSense) $iResult = StringInStr($avArray[^ ERROR This is the function where the error must be: Func CreateEverythingForDesign() For $i = 0 to $Forms Step +1 $SplittedScript = StringSplit(SCI_GETTEXT($Sci), @CRLF, 1) GUISetState(@SW_RESTORE,$ScriptGUI) $Pos = _ArraySearch ($SplittedScript, "%;Form&Start&"&$i&";%", 0, 0, 0, True) $Pos1 = _ArraySearch ($SplittedScript, "%;Form&Created&"&$i&";%", 0, 0, 0, True) For $ii = $Pos To $Pos1 Step +1 $Pos2 = _ArraySearch ($SplittedScript, "GUICreate(", $ii, $ii, 0, True) If @error = 6 Then Else $GUICtrlFunctions = StringSplit($SplittedScript[$Pos2], ",") MsgBox(0,"dddd",$GUICtrlFunctions[1]) EndIf Next Next EndFunc Thnx, Kip Edited May 16, 2007 by kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
Valuater Posted May 16, 2007 Posted May 16, 2007 1 This tells you the error was made/found in the array.au3 include ( you included at the top of your script ) C:\PROGRA~1\AutoIt3\Include\array.au3 (496) 2 The 496 tells you what line the error was found on 3 With "Array variable subscript badly formatted" and "$iResult = StringInStr($avArray[$iCurrentPos], $vWhat2Find, $iCaseSense) $iResult = StringInStr($avArray[^ ERROR" You use StringSplit() here $SplittedScript = StringSplit(SCI_GETTEXT($Sci), @CRLF, 1) maybe you could test that array If Not IsArray($SplittedScript) Then MsgBox() Lastly I cant help with the array search in the reg-express style you used... but if the above doesn't help, its most likely there 8)
Kip Posted May 16, 2007 Author Posted May 16, 2007 (edited) 496 means the line 496 in array.au3, and $SplittedString is always a array. (in my script) And if he says that there is an error in Array.au3, then he must be called from of the _ArraySearch functions, and not from the StringSplit function Edited May 16, 2007 by kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
Valuater Posted May 16, 2007 Posted May 16, 2007 Yes the error is occurring in the _ArraySearch() function, however, it is being sent incorrect information... or a non-array 8)
Kip Posted May 16, 2007 Author Posted May 16, 2007 damn, the only thing that I had to do is changing the 0 to a 1: With errorFor $i = 0 to $Forms Step +1Without errorFor $i = 1 to $Forms Step +1 MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
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