naf4ever
Dread Lord
Simply trying to get the unit owner from a range of units. But keeping getting errors.
Says my object has no attribute for getOwner in the mPlayer line. Ive tried a few of the other .getUnit commands for pUnit, but few seem to work with the integar there.
Any ideas?
Code:
def onBeginPlayerTurn(self, argsList):
GameTurn, iPlayer = argsList
player = gc.getPlayer(iPlayer)
for i in range(player.getNumUnits()):
pUnit = gc.getUnitInfo(i)
mPlayer = gc.getPlayer(pUnit.getOwner())
Says my object has no attribute for getOwner in the mPlayer line. Ive tried a few of the other .getUnit commands for pUnit, but few seem to work with the integar there.
Any ideas?