What's the point of this? , Blizzard's function does the same and it would actually be faster than this
Count Units in a Group
not ratedCounts the number of units in a given group!
///////////////////////////////////////////////////////////////////
//***************************************************************//
// *//
// For more Jass Functions visit us at http://www.wc3jass.com *//
// *//
//***************************************************************//
///////////////////////////////////////////////////////////////////
function CountUnitsInAGroup takes group g returns integer
local unit u
local integer i=0
local group g2
set g2=g
set u=FirstOfGroup(g2)
loop
exitwhen g2==null or u==null
if u!=null then
loop
exitwhen u==null or g2==null
set u=FirstOfGroup(g2)
set i=i+1
call GroupRemoveUnit(g2,u)
endloop
else
set i=1
set g2=null
endif
endloop
set u=null
call DestroyGroup(g2)
return i-1
endfunction
What's the point of this? , Blizzard's function does the same and it would actually be faster than this