Seriously, those errors are a joke. No information at all (okay, thats something I am used to from the wc3 compiler) and the line is way off usually (not like in wc3 where it could be that the error was 2 or 3 lines above the compiler message, currently I have to look for an error about 2 or 3 triggers above -.-)
Some reasoning behind this? Something I should avoid, which makes the compiler lose track of the lines?
Do keep in mind that when the compiler error comes up its if you the line in the out putted script that has the error. But the line it auto scrolls to is not the line it is generally refering to as the one that failed.
If it says you have an error on line 2073 I have found that you well find an error or a reference to a function that is bad on line 2073.
And seriously if your gonna make a post like this you should screen shot the error dialog as well as the line of script its pointing you to so we can try to assist you ,and /or determine if your right or wrong.
Do keep in mind that when the compiler error comes up its if you the line in the out putted script that has the error. But the line it auto scrolls to is not the line it is generally refering to as the one that failed.
If it says you have an error on line 2073 I have found that you well find an error or a reference to a function that is bad on line 2073.
And seriously if your gonna make a post like this you should screen shot the error dialog as well as the line of script its pointing you to so we can try to assist you ,and /or determine if your right or wrong.
Well, I just wanted to ask, if this is a known issue and there is some easy way to prevent this.
I just tried it out by adding a random sign in a line to cause a Syntax Error (I added a new line, containing only a "+" sign). The compiler shows an error in line 2731. In the error window, if I click on the marked line, it is line 2731. If I watch the map script separately and go to line 2731, it is the line marked by the compiler.
However, the real error is located in line 2647, thats a difference of whooping 84 lines of code!
I could provide you with a screenshot, but I doubt, there would be any more useful information in it; it just shows the numbers stated.
Simply adding a random letter: Shows right line
Adding a + sign randomly: Shows the line right under the actual error
Forgetting a semi-colon: Shows the line right under the actual error
Forgetting a winged bracket: Shows the line right under the actual error
Forgetting to close a if-statement: Shows the error one line after the end of the faulty trigger (which basically is the correct behavior)
Typo in a variable/function name: Shows the right line
Not closing a function with a bracket: Shows the line right under the actual error
Forgetting to define a variable type: Shows the right line
Adding invalid escape sequence in a string: Shows the right line
It's common for not-so-good compilers to mark the line under the actual error as the problem.
But I don't have problems generally.
From time to time the line might not be correct, but it happens rarely to me that it's shifted by more than one line.
That's why I wanted to know what type of error made this happen.
Simply adding a random letter: 84 lines off
Adding a + sign randomly: 85 lines off
Forgetting a semi-colon: 85 lines... (you get the idea)
So I am guessing, this is basically the same issue the wc3 compiler had. Whenever you used the map header of a map, the errors would be 2-3 lines off. So, just a theory: Every library (or every entry in libraries) for SC2 works like a "new map header" , which moves the errors another 2-3 lines.
I have exactly 21 custom script objects in my libraries. My errors are exactly 84 lines off. Coincidence? I will try around a bit.
€ seems to be not that easy, adding a new object did not increase the line offset to 88 ;)
€ deactivating one of the present objects (a quite big one, containing about 350 lines of script) decreases the offset to 47 o_0. It definitely had something to do with this.
Simply adding a random letter: 84 lines off
Adding a + sign randomly: 85 lines off
Forgetting a semi-colon: 85 lines... (you get the idea)
So I am guessing, this is basically the same issue the wc3 compiler had.
Whenever you used the map header of a map, the errors would be 2-3 lines
off. So, just a theory: Every library (or every entry in libraries) for
SC2 works like a "new map header" , which moves the errors another 2-3
lines.
I have exactly 21 custom script objects in my libraries. My errors are
exactly 84 lines off. Coincidence? I will try around a bit.
€ seems to be not that easy, adding a new object did not increase the
line offset to 88 ;)
€ deactivating one object decreases the offset to 47 o_0. It definitely
had something to do with this.
well you havent posted screen shots yet so Im gonna think your looking at it and reading the error wrong
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
2 screenshots of the same error message. Deleting the + line removes the error, so this is the only error the compiler shows.
I marked cursor positions and shown line numbers.
On screenshot 1 I move the cursor to the line stated by the compiler, it is, like stated, line 2731
On screenshot 2, I moved up to the actual error, line being 2647
When viewing the map script, the lines match, do you need screenshots, too?
BTW when I remove all library objects I added myself, the lines match.
I have had a similiar problem long time ago, but i found there to be some correlation to the line given to where the error actually was. Remember that Error lines dont alway indicate the actuall syntax error in any programming language.
Is there any change that that line 2647 is part of that UnitDamage function because then it makes perfect sense.
Maybe some of the other people can make more sense of it with the screen shots.
What do you mean by "library objects you added yourself" sorry I dont code in script I just read it when i have errors.
Oh BTW does anybody know if the editor actually generates a local text file when compiling these scripts?
I have had a similiar problem long time ago, but i found there to be some correlation to the line given to where the error actually was. Remember that Error lines dont alway indicate the actuall syntax error in any programming language.
The correlation would be the correct line always being exactly 84 lines above the stated line (I tried this multiple times at multiple locations of my script), as long as I keep the library unchanged.
Quote:
Is there any change that that line 2647 is part of that UnitDamage function because then it makes perfect sense.
The lines are in completely different script parts about 3 triggers (more specifically custom script objects) separated and in absolutely no way correlated
Quote:
What do you mean by "library objects you added yourself" sorry I dont code in script I just read it when i have errors.
I am referring to objects added to the "library" part of the trigger editor (ctrl + shift + L to show). These are not the actual triggers, but functions available for all other triggers created later on.
They are not script-specific, though, you can easily add Gui - Triggers here.
Quote:
Oh BTW does anybody know if the editor actually generates a local text file when compiling these scripts?
2 screenshots of the same error message. Deleting the + line removes the error, so this is the only error the compiler shows.
I marked cursor positions and shown line numbers.
On screenshot 1 I move the cursor to the line stated by the compiler, it is, like stated, line 2731
On screenshot 2, I moved up to the actual error, line being 2647
When viewing the map script, the lines match, do you need screenshots, too?
BTW when I remove all library objects I added myself, the lines match.
Lol just to make sure: In screenie one there is a semi-color after the "return true", isn't there? With the red color you can't really see.
Seriously, those errors are a joke. No information at all (okay, thats something I am used to from the wc3 compiler) and the line is way off usually (not like in wc3 where it could be that the error was 2 or 3 lines above the compiler message, currently I have to look for an error about 2 or 3 triggers above -.-)
Some reasoning behind this? Something I should avoid, which makes the compiler lose track of the lines?
Bug confirmed. I have that also.
The compiler is horribad anyway.
Mind if I ask what kind of error caused this?
Do keep in mind that when the compiler error comes up its if you the line in the out putted script that has the error. But the line it auto scrolls to is not the line it is generally refering to as the one that failed.
If it says you have an error on line 2073 I have found that you well find an error or a reference to a function that is bad on line 2073.
And seriously if your gonna make a post like this you should screen shot the error dialog as well as the line of script its pointing you to so we can try to assist you ,and /or determine if your right or wrong.
Well, I just wanted to ask, if this is a known issue and there is some easy way to prevent this.
I just tried it out by adding a random sign in a line to cause a Syntax Error (I added a new line, containing only a "+" sign). The compiler shows an error in line 2731. In the error window, if I click on the marked line, it is line 2731. If I watch the map script separately and go to line 2731, it is the line marked by the compiler.
However, the real error is located in line 2647, thats a difference of whooping 84 lines of code!
I could provide you with a screenshot, but I doubt, there would be any more useful information in it; it just shows the numbers stated.
What kind of error has false lines showing up? Any error. Whenever I have an error of any kind, the line is way off.
Or what error causes the lines to be wrong? I have no idea there.
Simply adding a random letter: Shows right line
Adding a + sign randomly: Shows the line right under the actual error
Forgetting a semi-colon: Shows the line right under the actual error
Forgetting a winged bracket: Shows the line right under the actual error
Forgetting to close a if-statement: Shows the error one line after the end of the faulty trigger (which basically is the correct behavior)
Typo in a variable/function name: Shows the right line
Not closing a function with a bracket: Shows the line right under the actual error
Forgetting to define a variable type: Shows the right line
Adding invalid escape sequence in a string: Shows the right line
It's common for not-so-good compilers to mark the line under the actual error as the problem.
But I don't have problems generally.
From time to time the line might not be correct, but it happens rarely to me that it's shifted by more than one line.
That's why I wanted to know what type of error made this happen.
Simply adding a random letter: 84 lines off
Adding a + sign randomly: 85 lines off
Forgetting a semi-colon: 85 lines... (you get the idea)
So I am guessing, this is basically the same issue the wc3 compiler had. Whenever you used the map header of a map, the errors would be 2-3 lines off. So, just a theory: Every library (or every entry in libraries) for SC2 works like a "new map header" , which moves the errors another 2-3 lines.
I have exactly 21 custom script objects in my libraries. My errors are exactly 84 lines off. Coincidence? I will try around a bit.
€ seems to be not that easy, adding a new object did not increase the line offset to 88 ;)
€ deactivating one of the present objects (a quite big one, containing about 350 lines of script) decreases the offset to 47 o_0. It definitely had something to do with this.
well you havent posted screen shots yet so Im gonna think your looking at it and reading the error wrong
-.- I am not blind.
2 screenshots of the same error message. Deleting the + line removes the error, so this is the only error the compiler shows.
I marked cursor positions and shown line numbers.
On screenshot 1 I move the cursor to the line stated by the compiler, it is, like stated, line 2731
On screenshot 2, I moved up to the actual error, line being 2647
When viewing the map script, the lines match, do you need screenshots, too?
BTW when I remove all library objects I added myself, the lines match.
I have had a similiar problem long time ago, but i found there to be some correlation to the line given to where the error actually was. Remember that Error lines dont alway indicate the actuall syntax error in any programming language.
Is there any change that that line 2647 is part of that UnitDamage function because then it makes perfect sense.
Maybe some of the other people can make more sense of it with the screen shots.
What do you mean by "library objects you added yourself" sorry I dont code in script I just read it when i have errors.
Oh BTW does anybody know if the editor actually generates a local text file when compiling these scripts?
The correlation would be the correct line always being exactly 84 lines above the stated line (I tried this multiple times at multiple locations of my script), as long as I keep the library unchanged.
The lines are in completely different script parts about 3 triggers (more specifically custom script objects) separated and in absolutely no way correlated
I am referring to objects added to the "library" part of the trigger editor (ctrl + shift + L to show). These are not the actual triggers, but functions available for all other triggers created later on.
They are not script-specific, though, you can easily add Gui - Triggers here.
No idea
Lol just to make sure: In screenie one there is a semi-color after the "return true", isn't there? With the red color you can't really see.
Yep, there is ;) Otherwise removing the + would not remove the error, would it?
Chances are what ever you added to the library is the causing the difference then ....
from what you said it sounds like all of your errors are off by the same ammount each time? Line count wise...
I have never added anything to the "library".... what exactly did you add? to it just kinda wondering.