- Joined
- Oct 11, 2012
- Messages
- 711
JASS:
function example takes nothing returns nothing
local unit u
local real r
local integer i
if check == true then
set u = GetAttacker()
set r = 1.50
set i = 2
//do actions....
set u=null
endif
endfunction
Do I need to null the unit variable "u" outside of the "if" condition? I mean if "check == false", do i still need to null the unit variable "u"? Such as the following:
JASS:
function example takes nothing returns nothing
local unit u
local real r
local integer i
if check == true then
set u = GetAttacker()
set r = 1.50
set i = 2
//do actions....
set u=null
endif
set u = null // do i need this? I dont think so but Im not sure...
endfunction