While compiling my SDK for Beyond the Sword, I came across this error:
Here is the code that is affected by the first error (see red font):
And here is the second error:
Any suggestions on how to fix this?
Code:
Project : CvGameCoreDLL
Compiler : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Games\Sid Meier's Civilization IV\Beyond the Sword\CvGameCoreDLL\
--------------------------------------------------------------------------------
Switching to target: Final Release
CvCity.cpp
[COLOR="Red"]CvCity.cpp(7883) : error C3861: 'hasActiveBuilding': identifier not found, even with argument-dependent lookup
CvCity.cpp(8404) : error C3861: 'hasActiveBuilding': identifier not found, even with argument-dependent lookup[/COLOR]
Process terminated with status 1 (0 minutes, 6 seconds)
2 errors, 0 warnings
Here is the code that is affected by the first error (see red font):
Code:
// Grave's History in the Making Component: Changes Start
int CvCity::getBuildingYieldChange(YieldTypes eIndex) const
{
FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
FAssertMsg(eIndex < NUM_YIELD_TYPES, "eIndex expected to be < NUM_YIELD_TYPES");
return m_aiBuildingYieldChange[eIndex];
}
void CvCity::changeBuildingYieldChange(YieldTypes eIndex, int iChange)
{
FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
FAssertMsg(eIndex < NUM_YIELD_TYPES, "eIndex expected to be < NUM_YIELD_TYPES");
if (iChange != 0)
{
m_aiBuildingYieldChange[eIndex] = (m_aiBuildingYieldChange[eIndex] + iChange);
FAssert(getYieldRate(eIndex) >= 0);
if (eIndex == YIELD_COMMERCE)
{
updateCommerce();
}
AI_setAssignWorkDirty(true);
if (getTeam() == GC.getGameINLINE().getActiveTeam())
{
setInfoDirty(true);
}
}
}
void CvCity::updateBuildingYieldChange()
{
int iI, iJ;
for (iI = 0; iI < NUM_YIELD_TYPES; iI++)
{
m_aiBuildingYieldChange[iI] = 0;
}
for (iI = 0; iI < GC.getNumBuildingInfos(); iI++)
{
[COLOR="Red"]if (hasActiveBuilding((BuildingTypes)iI))[/COLOR]
{
for (iJ = 0; iJ < NUM_YIELD_TYPES; iJ++)
{
changeBuildingYieldChange((YieldTypes)iJ, GET_PLAYER(getOwnerINLINE()).getBuildingYieldChange((BuildingTypes)iI, (YieldTypes)iJ));
}
}
}
AI_setAssignWorkDirty(true);
if (getTeam() == GC.getGameINLINE().getActiveTeam())
{
setInfoDirty(true);
}
}
// Grave's History in the Making Component: Changes End
And here is the second error:
Code:
// < Grave's History in the Making Component: Changes Start >
int CvCity::getBuildingCommerceChange(CommerceTypes eIndex) const
{
FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
FAssertMsg(eIndex < NUM_COMMERCE_TYPES, "eIndex expected to be < NUM_YIELD_TYPES");
return m_aiBuildingCommerceChange[eIndex];
}
void CvCity::changeBuildingCommerceChange(CommerceTypes eIndex, int iChange)
{
FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
FAssertMsg(eIndex < NUM_COMMERCE_TYPES, "eIndex expected to be < NUM_YIELD_TYPES");
if (iChange != 0)
{
m_aiBuildingCommerceChange[eIndex] = (m_aiBuildingCommerceChange[eIndex] + iChange);
FAssert(getCommerceRate(eIndex) >= 0);
if (eIndex == YIELD_COMMERCE)
{
updateCommerce();
}
AI_setAssignWorkDirty(true);
if (getTeam() == GC.getGameINLINE().getActiveTeam())
{
setInfoDirty(true);
}
}
}
void CvCity::updateBuildingCommerceChange()
{
int iI, iJ;
for (iI = 0; iI < NUM_COMMERCE_TYPES; iI++)
{
m_aiBuildingCommerceChange[iI] = 0;
}
for (iI = 0; iI < GC.getNumBuildingInfos(); iI++)
{
[COLOR="Red"]if (hasActiveBuilding((BuildingTypes)iI))[/COLOR]
{
for (iJ = 0; iJ < NUM_COMMERCE_TYPES; iJ++)
{
changeBuildingCommerceChange((CommerceTypes)iJ, GET_PLAYER(getOwnerINLINE()).getBuildingCommerceChange((BuildingTypes)iI, (CommerceTypes)iJ));
}
}
}
AI_setAssignWorkDirty(true);
if (getTeam() == GC.getGameINLINE().getActiveTeam())
{
setInfoDirty(true);
}
}
// < Grave's History in the Making Component: Changes End >
Any suggestions on how to fix this?
