CountUnitsInGroup

Parameters
g group
comment
note

If the global bj_wantDestroyGroup is set to true then destroys the passed group g.

patch

1.00

return type
integer
Source code
function CountUnitsInGroup takes group g returns integer
    // If the user wants the group destroyed, remember that fact and clear
    // the flag, in case it is used again in the callback.
    local boolean wantDestroy = bj_wantDestroyGroup
    set bj_wantDestroyGroup = false

    set bj_groupCountUnits = 0
    call ForGroup(g, function CountUnitsInGroupEnum)

    // If the user wants the group destroyed, do so now.
    if (wantDestroy) then
        call DestroyGroup(g)
    endif
    return bj_groupCountUnits
endfunction
Source
Blizzard.j
wc3modding.com
CountUnitsInGroup