GetUnitsOfPlayerMatching
- Parameters
whichPlayer playerfilter boolexpr- comment
- bug
Leaks handle
g: In Jass you must set local variables that hold agents (or any child type) tonullat the end of functions to avoid reference counter leaks.- note
Destroys the
filterboolexprreceived as argument.- note
Creates a new group object and returns it. The caller must remove it on its own after use.
- patch
1.00
- Source
- Blizzard.j (suggest an edit or discuss on Github)
- return type
group- Source code
function GetUnitsOfPlayerMatching takes player whichPlayer, boolexpr filter returns group local group g = CreateGroup() call GroupEnumUnitsOfPlayer(g, whichPlayer, filter) call DestroyBoolExpr(filter) return g endfunction