- Joined
- Nov 21, 2012
- Messages
- 835
Hello, I know theres much about leaks on Hive but Im not sure about this:
---
Second question is:
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?
-
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
-
-
---
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?