Quantcast
Channel: Civilization Fanatics' Forums
Viewing all articles
Browse latest Browse all 12856

What's wrong about this code?

$
0
0
I'm having some trouble getting this code to function:

Spoiler:
Code:

GameEvents.PlayerDoTurn.Add(function(iPlayer)
local pPlayer = Players[iPlayer];
        if pPlayer:GetCivilizationType() == GameInfoTypes["CIVILIZATION_RUSSIA_NICHOLAS"] then
                for iCity in pPlayer:Cities() do
                        local ProductionBoost = (iCity:GetProduction() + iCity:GetFaithPerTurn())
                        iCity:SetBuildingProduction(ProductionBoost)
                end
        end
end)



I'm not sure what I'm doing wrong, as it had worked for Wonder Production. But because Wonder Production doesn't have a SetWonderProduction command (rather, ChangeWonderProduction, which means the boost will exponentially increase every turn), I'll have to settle with general building production.

Any indication as to what I'm doing wrong would be appreciated.

Viewing all articles
Browse latest Browse all 12856

Trending Articles