GetUnitsInRectMatching

Parameters
r rect
filter boolexpr
bug

Leaks handle g: In Jass you must set local variables that hold agents (or any child type) to null at the end of functions to avoid reference counter leaks.

comment
note

Destroys the filter boolexpr received as argument.

note

Creates a new group object and returns it. The caller must remove it on its own after use.

return type
group
Source code
function GetUnitsInRectMatching takes rect r, boolexpr filter returns group
    local group g = CreateGroup()
    call GroupEnumUnitsInRect(g, r, filter)
    call DestroyBoolExpr(filter)
    return g
endfunction
Source
Blizzard.j
wc3modding.com
GetUnitsInRectMatching