GroupEnumUnitsOfTypeCounted

Parameters
whichGroupgroup

The group to be modified.

unitnamestring

The internal name of the unit definition to consider for adding units. For original unit definitions, this equals the name property in units/unitui.slk, for custom unit definitions, it equals "custom_" + fourcc (e.g., "custom_h000").

filterboolexpr

A filter function that is run for each considered unit.

countLimitinteger

Maximum amount of units to be considered. (Does not work)

comment

Clears a group and then adds units of matching internal name to it.

Does nothing if whichGroup is null or the resulting unit type ID is invalid (-1).

note

See GroupEnumUnitsOfType

bug

Causes irregular behavior when used with large numbers.

note

Probably countLimit doesn't work similar to GroupEnumUnitsInRangeCounted. Instead see GroupEnumUnitsOfType.

patch

1.00

Source
common.j (raise an issue to discuss on Github or submit a PR)
return type
nothing
Source code
native GroupEnumUnitsOfTypeCounted          takes group whichGroup, string unitname, boolexpr filter, integer countLimit returns nothing