1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Solved] Unknown Compile Error with WEX

Discussion in 'Warcraft Editing Tools' started by bob666777, Jul 16, 2018.

Tags:
  1. bob666777

    bob666777

    Joined:
    Jul 16, 2018
    Messages:
    9
    Resources:
    0
    Resources:
    0
    Hey there, I'm an old mapmaker who's returning to wc3 after several years and my memory is failing me. Can you not declare globals inside a trigger? I feel like I used to be able to do that, yet I'm getting an "unknown compile error" from it. I also tried putting them in the map header and had the same error.

    I'm using WEX (I'm used to NewGen, not sure what the differences are).
     
  2. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
  3. bob666777

    bob666777

    Joined:
    Jul 16, 2018
    Messages:
    9
    Resources:
    0
    Resources:
    0
    I did! Didn't fix my issue unfortunately. I take it this confirms that I'm not crazy and you're supposed to be able to declare globals in triggers? Lol.
     
  4. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    26,199
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    vJASS supports multiple global declaration using the syntax...
    Code (vJASS):

    globals
        integer AGlobalInteger = 1337
    endglobals
     

    At compile time this is converted into a single globals block at the top of the map script by the vJASS compiler.
     
  5. bob666777

    bob666777

    Joined:
    Jul 16, 2018
    Messages:
    9
    Resources:
    0
    Resources:
    0
    Is there anything I need to do to enable vJass after opening WEX for the first time? I just figured it would be enabled automatically.

    Edit: Just looked through the menus and I do have "Enable vJass" checked under Compilers. So I guess my editor is just bugged then...

    I didn't see any install instructions on the WEX download page - I just put mine inside my Warcraft III folder and I did replace the addresses.xml file as indicated in the thread. Is there anything else I should have done?
     
    Last edited: Jul 16, 2018
  6. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,838
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    If you are on 1.29.1 or 1.29.2 then you need to download an updated addresses.xml

    SharpCraft World Editor Extended Bundle

    vJASS is included with the vanilla world editor in patch 1.30.
     
  7. bob666777

    bob666777

    Joined:
    Jul 16, 2018
    Messages:
    9
    Resources:
    0
    Resources:
    0
    I did do that! Maybe I did it wrong? I do just replace the one that's under WEX\plugins, right?

    Are you saying blizzard is going to start supporting vJass or am I misunderstanding you?

    (Also hey, I remember your name from way back in the day. Crazy that some of these old names are still around.)

    Also, can I edit the thread title to better represent what seems to be the new issue?
     
    Last edited by a moderator: Jul 16, 2018
  8. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,838
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Yeah. Make sure that you disable the vanilla syntax checker in the compilers menu and also confirm that you are on patch 1.29.2.

    Yes JassHelper will be included with the editor. You can see it in the patch notes.

    https://us.battle.net/forums/en/bnet/topic/20765647087

    What error are you getting now?
     
  9. bob666777

    bob666777

    Joined:
    Jul 16, 2018
    Messages:
    9
    Resources:
    0
    Resources:
    0
    Okay, I'm getting strange behaviour now. If I remove the globals tag from my trigger, enable the trigger, then re-add it and THEN save, it doesn't give me a compile error when saving. If I try to enable the trigger without removing the globals tag, it gives me a compile error.

    So I guess my question here is this: Does the compiler only check saved code?
    I don't remember it behaving like that, but I do suppose it's been a long time.

    Either way, I guess the original issue is solved now. Thanks for the responses.