Jump to content

Error: "Func" statement has no matching "EndFunc"


 Share

Recommended Posts

Posted Image

(...)

            ; Show input dialog
            $destfldr = FileSelectFolder("Choose the source directory.", "", 1)
            
            ; Add slashes if needed
            $destcuttingtest = StringRight($destfldr, 1)
            If Not ($destcuttingtest = "\") Then
                $destfldr = $destfldr & "\"
            EndIf
            
            ; Update GUI if needed
            If Not ($destfldr = "\") Then
                GUICtrlSetData($drivecfg_destinput, $destfldr)
            EndIf
            
            
        Case $msg = $drivecfg_cancelbutton
            ; Kill the GUI
            GUIDelete("USBsyncer v " & $version & " - Drive configuration")
            ExitLoop
            
            
        Case $msg = $drivecfg_writeconfig
            GUICtrlSetState($drivecfg_wait, $GUI_SHOW)
            ; Add slashes if needed
            $srccuttingtest = StringRight($srcfldr, 1)
            If Not ($srccuttingtest = "\") Then
                $srcfldr = $srcfldr & "\"
            EndIf
            $destcuttingtest = StringRight($destfldr, 1)
            If Not ($destcuttingtest = "\") Then
                $destfldr = $destfldr & "\"
            EndIf

            ; Determine the destination drive by cutting the destination folder string
            $destdrive = StringLeft($destfldr, 3)

            ; Destroy unneeded strings from older version in the settings file
;~          If Not (IniRead($destdrive & "USBsyncer.ini", "USBsyncer", "sync", "error") = "error") Then
;~              IniDelete($destdrive & "USBsyncer.ini", "USBsyncer")
;~          EndIf
            
            ; Write the settings
            $targetini = $destdrive & "USBsyncer.ini"
            IniWrite($targetini, "IMPORTANT", "PleaseRead", "Please don't delete/change this file. It's being used by USBsyncer, a folder synchronization utility. Unless you're sure that you don't need this file anymore, stay away. :)")
            IniWrite($targetini, "general", "UID", $uid)
            IniWrite($targetini, "general", "version", $version) ;This is line 433
            IniWrite($targetini, "sync", "src", $srcfldr)
            IniWrite($targetini, "sync", "dest", $destfldr)

(...)
Why do I get this error message? I checked it, all "Func" statements have matching "EndFunc" 's.

iPod + Online calendars = iPodCALsync

Link to comment
Share on other sites

A fast way to see your problem visually is to toggle all folds in Scite (under the view menu). all funcs will toggle until you get to the one where the problem stars...

open it and toglle the most inner folds if...endif, while...wend and so on, to the most outer folds. You'll eventually get to the one breaking the sequence. Long scripts can be a real brain toddler if you see what i mean.

IVAN

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
 Share

  • Recently Browsing   0 members

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