I'm having problems removing units from groups. Specifically I want to remove all tankers from task forces (so I can speed them up)
Code:
if group.groupName.find("TaskForce") != -1:
for unit in group.units:
if unit.type == UnitType.TANKER:
group.units.remove(unit)
I get an error that says:
Traceback (innermost last)
File "<string>", line 2, in ?
Any ideas?