Jump to content

I don't know a title for this, because I don't know what the error is.

Recommended Posts

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)
        $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
                $GUICtrlFunctions = StringSplit($SplittedScript[$Pos2], ",")

Thnx, Kip

Edited by kip
Link to comment
Share on other sites


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)


The 496 tells you what line the error was found on


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



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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...