• 🏆 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!

jass new gen5d false syntax errors

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,337
Hi,

I downloaded the jass new gen5d package and updated the jass helper, etc. according to the instructions on that page. But this still claims that there are hundreds of the syntax errors for the jass code already in the map, which can't be true, because the map and its systems work fine already (monster master rpg ).

Also wouldn't this be valid JASS?

JASS:
library Objects
endlibrary

Here's a more concrete example:

JASS:
library F9Log initializer init

globals
    private quest q
endglobals

private function init takes nothing returns nothing
    //Var Init
    local string s
    //Save & Load
    set q = CreateQuest()

This brings up the following error: undeclared variable q, in addition to a hundred other errors claiming that "statement outside of function." Note I didn't include the entire library from above, but the function is complete and has endfunction, etc.
 
Also wouldn't this be valid JASS?

Valid vJass, yeah.

Here's a more concrete example:
This brings up the following error: undeclared variable q, in addition to a hundred other errors claiming that "statement outside of function." Note I didn't include the entire library from above, but the function is complete and has endfunction, etc.

Well you're missingendfunctionandendlibrarybut other than that it's syntactically correct.
 
Level 15
Joined
Aug 7, 2013
Messages
1,337
endfunction and endlibrary are in the right places for that last example, it's just the first snippet of the code.

So why am I getting these errors?
 
I'm guessing you're using the "Syntax Check" button in the trigger editor (TESH)?

TESH was originally developed independently of Jass NewGen Pack, and wasn't included in the bundle for a while. When it was originally developed, it only highlighted vanilla JASS (highlighting for vJASS came later by request). SFilip did not make the syntax checker (PJASS), but he just included it has a feature. PJASS only checks vanilla JASS code for script errors.

When compiling a map in JNGP, there are two phases -> compile vJASS into regular JASS (the vJASS/jasshelper compiler runs some syntax checks too) -> run it through PJASS to check for syntax errors. That's why you'll sometimes see the error code written in regular JASS, even though you wrote it in vJASS.

tl;dr, don't use the syntax check feature. Just use the "save map". If your map takes long to save, I highly, highly, highly recommend doing most of your code tests in blank maps. It'll speed up development like crazy, and you'll often end up with better code since you'll be forced to make the code portable.
 
Status
Not open for further replies.
Top