Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Editor: Undeclared Function... What does it mean?

Discussion in 'World Editor Help Zone' started by RanCatu1020, Dec 29, 2018.

  1. RanCatu1020

    RanCatu1020

    Joined:
    Mar 23, 2017
    Messages:
    60
    Resources:
    1
    Models:
    1
    Resources:
    1
    Hey guys, so I'm trying to implement Tank-Commander's Massive Cleave in my map but this always pops up when I try running the game. What does this mean and how can I fix this? I've tried searching it in the internet and did the solutions of other problems that seemed identical to mine but the same thing pops up. +rep for anyone who can help me. Thanks in advance.
    Untitled d.jpg
     
  2. mori

    mori

    Joined:
    Jun 13, 2016
    Messages:
    450
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    This means this function was not defined at the moment you're trying to call it.

    JASS has a very simple and primitive parsing model. If the function you're trying to call is defined after the call site, it won't work. It might also just be missing.
     
  3. RanCatu1020

    RanCatu1020

    Joined:
    Mar 23, 2017
    Messages:
    60
    Resources:
    1
    Models:
    1
    Resources:
    1
    So how can I fix this?

    It worked perfectly fine on the downloaded and unedited map: Massive Cleave
    But whenever I tried making small changes to that map too such as placing a unit that wasn't in that map originally it also displays the same error.
     
  4. Michael Peppers

    Michael Peppers

    Joined:
    Jun 23, 2009
    Messages:
    153
    Resources:
    1
    Models:
    1
    Resources:
    1
    Taken from the resource's page:
    Code (vJASS):
    ////////////////////////////////////////////////////////////////////
    //                     MASSIVE CLEAVE V1.01                       //
    //  Author: Tank-Commander                                        //
    //  Purpose: A powerful keepaway ability for scaring opposition   //
    //                                                                //
    //  Requires:                                                     //
    //    - (optional) BUS_Knockback by Tank-Commander                //
    //      remove lines outlined by "******" in code if not used     //

    Apparently you need to either remove the lines mentioned or add BUS_Knockback (from this) into your map. Kind of a shame, the original author could've easily avoided this by using vJass and adding an optional require and a couple of checks. Sure, plain JASS might've been the more user-friendly choice at the time but since JassHelper is included with the Editor now it kinda ruins it imo.
     
  5. RanCatu1020

    RanCatu1020

    Joined:
    Mar 23, 2017
    Messages:
    60
    Resources:
    1
    Models:
    1
    Resources:
    1
    Ahh I see... But the map already has Knockback system sir. :(
     
  6. Michael Peppers

    Michael Peppers

    Joined:
    Jun 23, 2009
    Messages:
    153
    Resources:
    1
    Models:
    1
    Resources:
    1
    ...huh... then I guess there's a problem with the order in which the scripts are compiling? Weird. Must be new to the patch (or an error in Jasshelper) since the map you downloaded works fine. Ok, then we must make sure BUS_Knockback is parsed first.
    Take the Knockback script:

    (This one)
    Code (vJASS):
    ////////////////////////////////////////////////////////////////////
    //             Boss Ultimate Spellpack Knockback V1.01            //

    Add
    library BUSKnockback
    as the first line and
    endlibrary
    as the last line.

    It's a bit extreme as a solution but it *has* to work after this.
     
    Last edited: Dec 29, 2018
  7. RanCatu1020

    RanCatu1020

    Joined:
    Mar 23, 2017
    Messages:
    60
    Resources:
    1
    Models:
    1
    Resources:
    1
    It does work sir on the original map that I messed with but not on my map, it does run the triggers right but there were bugs in animations.
    Sorry for the late reply though. I took time messing with stuffs in it just to fix the bugs but yeah, it seems my map is bugged or something.
    Thank you for your time sir! +rep for you.