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

Leak Problem

Status
Not open for further replies.
Level 19
Joined
Oct 7, 2014
Messages
2,209
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