dansam92
New Member
- Reaction score
- 1
JASS:
globals
// values to carry to the DoThings function
real AmountToHeal
endglobals
function DoThings takes nothing returns boolean
/*nothing becomes boolean*/
call SetWidgetLife(GetFilterUnit(), GetWidgetLife(GetFilterUnit()) + AmountToHeal
/*GetEnumUnit() becomes GetFilterUnit()*/
return false
/*return false appears here*/
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
// Store values before the enum instead
set AmountToHeal = 200.0
// Note the next line.
call GroupEnumUnitsInRect(GROUP, bj_mapInitialPlayableArea, Filter(function DoThings))
// The end.
endfunction
code from http://www.thehelper.net/forums/showthread.php?t=138374
don't i have to call DestroyGroup(GROUP) when coding like this?
there is no leak without DestroyGroup?