Hi,
I have found several times that under certain circumstances if I am missing a } somewhere in my script than it will error out and give me an error that it can't find whatever the first library function I use is. In my case that is always Acc_x function in the Acc library in my lib folder. It threw me off for the longest time but after one time I put every acc function in my script then it finally gave me the missing } error that I needed.
Steve
Autohotkey 1.1.09.00
Windows 7 Enterprise 64 bit unicode
Debugger gives wrong error if missing a }
-
- Posts: 20
- Joined: 14 Jan 2014, 10:28
- Contact:
Re: Debugger gives wrong error if missing a }
The program can't read your mind to know what code is intended to be inside the braces despite the brace missing. It just parses the code under the assumption that you've written it correctly, and reports the first problem that it encounters.
For instance, the error below is "Functions cannot contain functions", not "missing close brace":
Library auto-includes are appended after the whole script is read, so by pasting them into your script you've probably changed their location relative to the braces.
For instance, the error below is "Functions cannot contain functions", not "missing close brace":
Code: Select all
function1() {
function2() {
}
-
- Posts: 20
- Joined: 14 Jan 2014, 10:28
- Contact:
Re: Debugger gives wrong error if missing a }
Thanks Lexikos! That doesn't fully makes sense to me as I put my functions at the end of the script too but if it isn't a bug than it doesn't matter. I will just have to watch my code more!
Re: Debugger gives wrong error if missing a }
Auto-included files are added incrementally after some other parts of the main script (or prior auto-includes) have already been processed, which may include processing of braces. It is possible for pre-processing to halt at an error within the main file before the auto-include is even considered, so it's not just about location.
Who is online
Users browsing this forum: No registered users and 17 guests