• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Leak Problem

Status
Not open for further replies.
Level 19
Joined
Oct 7, 2014
Messages
2,208
Hello Hive!
I was trying to fix a location leak but it sends a compile error of
Invalid argument type (unit)
This is the problem
  • Custom script: call RemoveLocation(udg_Pounce_TargetPoint)
  • Pounce
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pounce
    • Actions
      • Set Caster = (Casting unit)
      • Set OwnerCaster = (Owner of Caster)
      • Set Pounce_TargetPoint = (Target point of ability being cast)
      • Unit Group - Pick every unit in (Units within Pounce_AoE of Pounce_TargetPoint) and do (Actions)
        • Loop - Actions
          • Set Pounce_UnitGroup = (Picked unit)
          • Unit - Create 1 Locust for OwnerCaster at Pounce_TargetPoint facing Default building facing degrees
          • Set Dummy = (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to Dummy
          • Unit - Add Pounce (Dummy) to Dummy
          • Unit - Set level of Pounce (Dummy) for Dummy to (Level of Pounce for Caster)
          • Unit - Order Dummy to Human Mountain King - Storm Bolt Pounce_UnitGroup
      • Custom script: call DestroyGroup(udg_Pounce_UnitGroup)
      • Custom script: call RemoveLocation(udg_Pounce_TargetPoint)
 
Level 11
Joined
Dec 19, 2012
Messages
411
  • Custom script: call RemoveLocation(udg_Pounce_TargetPoint)
This custom script have no problem at all. The main problem should be this :

  • Set Pounce_UnitGroup = (Picked unit)
Is this a unit-group variable or unit variable?(From what i saw, you defined it as unit-type). So
  • Custom script: call DestroyGroup(udg_Pounce_UnitGroup)
will fail because you tried to destroy the unit-group variable while its a unit-type variable.
 
Status
Not open for further replies.
Top