Jump to content
Sign in to follow this  
logmein

A small bug

Recommended Posts

logmein

Func _exit () IniWrite(@SystemDir & "ImageConverter.ini", "Settings", "Dir1", GUICtrlRead($s))
    IniWrite(@SystemDir & "ImageConverter.ini", "Settings", "Dir2", GUICtrlRead($d))
 Exit ()
EndFunc

the au3check say : syntax error!

Share this post


Link to post
Share on other sites
BrettF

Okay our errors:

d:\my documents\ABC.au3(4,8) : ERROR: syntax error
    Exit ()
    ~~~~~~^

So now lets skip straight to the help file.

Lets look at Exit.

We read the freaking document and then we see it...

The parameter, if included, can be enclosed in parentheses. Thus, the following are equivalent: Exit, Exit 0, and Exit(0). However, Exit() is invalid.

Now tell me why the hell you couldn't work that out? Seems fairly simple if your debugging...

Also use the full version of SciTE if you're not already. Link is in my sig.

Cheers,

Brett

Share this post


Link to post
Share on other sites
Melba23

logmein,

Au3Check tells you more than that! In both the console and the Au3Check Errors message box it tells you exactly what is wrong. What does it say?

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
disc330

As Brett pointed out, your exit was all wrong. Also, I dont know if it was intended, but your not meant to have code on the same line as your functions first line.

Func _exit () ; Put nothing on this line after the brackets are closed.
    IniWrite(@SystemDir & "ImageConverter.ini", "Settings", "Dir1", GUICtrlRead($s))    
    IniWrite(@SystemDir & "ImageConverter.ini", "Settings", "Dir2", GUICtrlRead($d))
 Exit 
EndFunc

Thats all the problems findable in the given code, but as Melba23 said, your Au3Check is a lot more descrptive than just saying "Syntax Error". Read it fully and go over your code to see if you can find any more problems, double clicking the error will take you right to the line, it even shows you the character where the problem has been found... =P


Still learning...I love autoit. :)

Share this post


Link to post
Share on other sites
CodyBarrett

if you want it to exit after the iniwrtite place EXIT (not EXIT()) beneath the iniwrites on its own line :)

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  

×