• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

Leak Problem

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