naf4ever
Mar 14, 2006, 04:40 PM
First off thanks to everyone who's been helping me so far. This is what my code looks like at the moment:
sSci = []
player = gc.getActivePlayer()
for i in range(player.getNumCities()):
sSci.append(i)
sPoints = (player.getCity(sSci[i]).getSpecialistCommerce(1))
The code works without errors, but doesnt do what i want it to. Basically im trying to get the total science output from specialists from all my cities and then add them up to see their total. I thought sPoints would do this and return back the summed up values of the specialist science output from the cities in list sSci = [] . But it only returns back the output from the last city I built or acquired.
Anyone know how i can sum these values instead?
sSci = []
player = gc.getActivePlayer()
for i in range(player.getNumCities()):
sSci.append(i)
sPoints = (player.getCity(sSci[i]).getSpecialistCommerce(1))
The code works without errors, but doesnt do what i want it to. Basically im trying to get the total science output from specialists from all my cities and then add them up to see their total. I thought sPoints would do this and return back the summed up values of the specialist science output from the cities in list sSci = [] . But it only returns back the output from the last city I built or acquired.
Anyone know how i can sum these values instead?