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.

[Trigger] Custom script, "Missing End block" or "Unexpected )"

Discussion in 'Triggers & Scripts' started by DoomBlade, Sep 14, 2020.

  1. DoomBlade

    DoomBlade

    Joined:
    Feb 5, 2018
    Messages:
    365
    Resources:
    0
    Resources:
    0
    • Custom script: if life > GetUnitStateSwap(UNIT_STATE_LIFE, (uu) )


    I am losing my mind, I have been moving the brackets, removing the brackets. And changing position of brackets with space. Nothing works.

    I also used a variable, copied the custom text from the variable and it still does not work.

    Before moving from GUI to JASS or vJass, I am practicing custom scripts.

    :(
     
  2. disruptive_

    disruptive_

    Joined:
    Mar 19, 2017
    Messages:
    248
    Resources:
    0
    Resources:
    0
    Add "then" at the end
     
  3. DoomBlade

    DoomBlade

    Joined:
    Feb 5, 2018
    Messages:
    365
    Resources:
    0
    Resources:
    0
    Ahh, I added the then to an invidual custom script line.

    EDIT:
    I have another question
    • Custom script: set i = GetUnitAbilityLevelSwapped('A06H', u)
    • Custom script: call DisplayTextToForce( GetPlayersAll(), I2S(i) )


    This always returns 0. I checked that the ability code is correct.

    I need it to return the correct value to use a damage formula.

    @disruptive_
     
    Last edited: Sep 14, 2020
  4. Chaosy

    Chaosy

    Tutorial Reviewer

    Joined:
    Jun 9, 2011
    Messages:
    11,102
    Resources:
    18
    Icons:
    1
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    18
    Try without the "Swapped"