Kailric
Jack of All Trades
I am trying to get the team of the owner of the Holy City that is the same Religion as the AP, but I keep getting the error CvGame.cpp(9180) : error C2228: left of '.getTeam' must have class/struct/union type. Line 9180 is in bold in the code below. What do I need to do to convert hOwner to a team? I tired lots of ways below is just an example of one of the ways that doesn't work.
Code:
for (int iPlayer = 0; iPlayer < MAX_CIV_PLAYERS; ++iPlayer)
{
CvCity* pHolyCity = GC.getGameINLINE().getHolyCity(GC.getGameINLINE().getVoteSourceReligion((VoteSourceTypes)1));
CvPlayer& kLoopPlayer = GET_PLAYER((PlayerTypes)iPlayer);
PlayerTypes hOwner = (pHolyCity->getOwnerINLINE());
TeamTypes tOwner;
[B]tOwner = (hOwner.getTeam)[/B];
if (kLoopPlayer.isFullMember(kData.eVoteSource))
{
if (GET_TEAM(kLoopPlayer.getTeam()).canChangeWarPeace(tOwner))
{
GET_TEAM(kLoopPlayer.getTeam()).declareWar(tOwner, false, WARPLAN_DOGPILE);
}
}
}