ArtStyleType isn't ArtStyleType?

Enginseer

Salientia of the Community Patch
Supporter
Joined
Nov 7, 2012
Messages
3,674
Location
Somewhere in California
Code:
function ArtEvents(iPlayer)
    local pPlayer = Players[iPlayer]
    if pPlayer:IsMinorCiv() or pPlayer:IsBarbarian() then return end
    local ArtStyle = GameInfo.Civilizations[pPlayer:GetCivilizationType()].ArtStyleType 
    if ArtStyle == ARTSTYLE_EUROPEAN then
        print("this civ is european")
    elseif ArtStyle == ARTSTYLE_MIDDLE_EAST then
        print("this civ is middle east")
    elseif ArtStyle == ARTSTYLE_SOUTH_AMERICA then
        print("this civ is south american")
    elseif ArtStyle == ARTSTYLE_ASIAN then
        print("This civ is asian")
    elseif ArtStyle == ARTSTYLE_GRECO_ROMAN then
        print("the holy roman empire")
    end
end
GameEvents.PlayerDoTurn.Add(ArtEvents)

I'm confused on why this won't work because on firetuner.
db282b40-4a09-11e6-83bd-91d774dfeb51.png


It should supposedly work based on the print statement, but it doesn't seem to equal to the print statement itself. Anyone know why? :confused:
 
ARTSTYLE_EUROPEAN is an uninitialized variable, so has the value nil
"ARTSTYLE_EUROPEAN" is a string
 
Back
Top Bottom