GetUnitCountEx
- Parameters
unitid integeronly_done booleantownid integer- comment
- patch
1.00
- Source
- common.ai (raise an issue to discuss on Github or submit a PR)
- return type
integer- Source code
function GetUnitCountEx takes integer unitid, boolean only_done, integer townid returns integer if townid == -1 then if only_done then return GetUnitCountDone(unitid) else return GetUnitCount(unitid) endif else return GetTownUnitCount(unitid,townid,only_done) endif endfunction