Sign in to follow this  
Followers 0
Pieter

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

5 posts in this topic

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

Share this post


Link to post
Share on other sites



see in your targetini :P

Share this post


Link to post
Share on other sites

The 1st fault up to line 433, and not necessarily including line 433. Look from line 433 and backwards as error triggirs another. :P

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I still don't get it, but the error went away after doing some code editing.


iPod + Online calendars = iPodCALsync

Share this post


Link to post
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
Sign in to follow this  
Followers 0