It's work but i must test one more. If i write this:
iUnitClassType = CvUtil.findInfoTypeNum(gc.getUnitClassInfo, gc.getNumUnitClassInfos(), 'UNITCLASS_HORSE_ARCHER')
iUnitType = gc.getCivilizationInfo(player.getCivilizationType()).getCivilizationUnits(iUnitClassType)
#MY COMMENT FOR YOU THE_J: THIS MEAN THAT THIS CODE UPPER GIVE UNITCLASS_HORSE_ARCHER FOR UNITAI_ATTACK and put 2 Horse Archers in city (If is Mongolia, then put 2 Keshiks instead Horse Archers, etc).
for i in range(2):
pNewPlayer.initUnit(pCity.getConscriptUnit () , iX,iY, UnitAITypes.UNITAI_ATTACK, DirectionTypes.NO_DIRECTION )
for i in range(2):
pNewPlayer.initUnit(pCity.getConscriptUnit () , iX,iY, UnitAITypes.UNITAI_ATTACK_CITY_LEMMING, DirectionTypes.NO_DIRECTION )
for i in range(2):
pNewPlayer.initUnit(pCity.getConscriptUnit () , iX,iY, UnitAITypes.UNITAI_CITY_DEFENSE, DirectionTypes.NO_DIRECTION )
Is this code has errors?
I for now know only C language, not C++ yet.