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

Leaks GUI/Jass

Status
Not open for further replies.
Level 18
Joined
Nov 21, 2012
Messages
835
Hello, I know theres much about leaks on Hive but Im not sure about this:
  • DropItems
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to DropAllItems
    • Actions
      • Set TargetPoint = (Position of (Triggering unit))
      • -------- --------
      • For each (Integer TempIntegerA) from 1 to 6, do (Actions)
        • Loop - Actions
          • Hero - Drop the item from slot TempIntegerA of (Triggering unit)
      • -------- --------
      • Custom script: call RemoveLocation(udg_TargetPoint)
      • -------- --------
      • -------- should I use this 'null' here or not ? --------
      • Custom script: set udg_TargetPoint = null
The question is about last line. Var is global.
---
Second question is:

JASS:
function IsUnitAlive takes unit u returns boolean
  return not (GetUnitTypeId(u) == 0 or IsUnitType(u, UNIT_TYPE_DEAD))
endfunction

Unit 'u' is not declared as local, but used in GUI triggers, so should I use
set u = null
at the end of function or not?
 
Status
Not open for further replies.
Top