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

[Solved] Spell problem about Locals in GUI

Status
Not open for further replies.
Level 16
Joined
Apr 4, 2011
Messages
995
I am using some local variables in GUI to get a wait or whatever, instead of having to use hashtables because I think it would be easier. Since I'm not a JASS user, normally any functions I need in JASS i convert to custom text and just plug it in, but I came across a problem while doing this

  • Winter Chill Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Winter Chill
    • Actions
      • Custom script: local real WAIT
      • Custom script: local group ICEUNITS
      • Set WC_Caster = (Triggering unit)
      • Set WC_Level = (Level of (Ability being cast) for WC_Caster)
      • Set WC_TotalDamage = (WC_Damage + (WC_DamageIncrease x (Real(WC_Level))))
      • Set WC_TotalRange = (WC_Range + (WC_RangeIncrease x (Real(WC_Level))))
      • Set WC_TotalDuration = (WC_Duration + (WC_DurationIncrease x (Real(WC_Level))))
      • Set WC_Point1 = (Target point of ability being cast)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within WC_TotalRange of WC_Point1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of WC_Caster)) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
        • Loop - Actions
          • Custom script: call GroupAddUnitSimple( GetEnumUnit(), ICEUNITS )
      • Custom script: call RemoveLocation(udg_WC_Point1)
      • Custom script: set WAIT = udg_WC_TotalDuration
      • Custom script: call PolledWait( WAIT )
Inside the loop, I'm trying to add all picked units (picked by the unit group) to the local group ICEUNITS, so that after the wait I can remove them later (the effect targets units inside this group). The error message I receive is "Expected a name", and it highlights the line Custom script: call GroupAddUnitSimple( GetEnumUnit(), ICEUNITS )

How to fix?

EDIT: Nvm, fixed it on my own
 
Status
Not open for further replies.
Top