• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

syntax error

Status
Not open for further replies.
Level 2
Joined
Apr 1, 2019
Messages
156
When you save your map and it compiles your script if it gives a syntax error it tells you what it is but what line it's on and the text box of that line is never actually where the syntax error is. Is there a way to find where it is cause VS isn't catching any errors

edit: For some reason if I disable all my lua scripts I still get a sytax error, even if I delete them all, still an error. I don't think I'm using any custom scripts that encompass the error.

Unknown compile error - 'end' expected (to close 'function' at line 6636) near 'else'
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,010
It says what line number the error is on and inside that error box each line has a number before it telling you what number it is. Scroll the window until you find the line number it says has the syntax error.
 
Level 2
Joined
Apr 1, 2019
Messages
156
Like the syntax error doesn't seem to apply to the compiled gui code on the line it gives
JASS:
6629 function Trig_Game_Time_0_Rock_Gen_Seed_Func005C takes nothing returns boolean
6630     if ( not ( udg_MapSeedInt == 4 ) ) then
6631         return false
6632     endif
6633     return true
6634  endfunction
6635
6636  function Trig_Game_Time_0_Rock_Gen_Seed_Func006C takes nothing returns boolean
6637     if ( not ( udg_MapSeedInt == 5 ) ) then
6638         return false
6639     endif
6640     return true
6641 endfunction
 
Level 2
Joined
Apr 1, 2019
Messages
156
Thx but I'm trying to figure out why when I get a syntax error or any error on your script the error points to a line of code completely irrelevant to the error.
Just makes it take alot longer to find the error.

That code is just gui compiled into jass, it shouldn't give any errors.
 
Level 39
Joined
Feb 27, 2007
Messages
5,010
You can disable triggers in batches to figure out where the error is. It's my guess that you have some Custom Script lines where you tried to type JASS code and you should have typed Lua. Or triggers you copied from somewhere have such CS lines because they were written before Lua was a thing in wc3.
 
Status
Not open for further replies.
Top