error C2064: term does not evaluate to a function taking 1 arguments

Grave

1 Goat = 400 Horses
Joined
May 5, 2002
Messages
1,530
Location
Louisiana
Ok, what does that mean and how do I fix it? :lol:

Here is where CodeBlocks stops:

Code:
CvCity.cpp
CvCity.cpp(9912) : error C2064: term does not evaluate to a function taking 1 arguments
CvCity.cpp(9927) : error C2064: term does not evaluate to a function taking 1 arguments
CvCity.cpp(9942) : error C2064: term does not evaluate to a function taking 1 arguments
Process terminated with status 2 (0 minutes, 2 seconds)
3 errors, 0 warnings

Here is the affected code (in red) in CvCity.cpp:

Code:
int CvCity::getDomainHealRate(DomainTypes eIndex)
{
	FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
	FAssertMsg(eIndex < NUM_DOMAIN_TYPES, "eIndex expected to be < NUM_DOMAIN_TYPES");
	return m_piDomainHealRate[eIndex];
}

void CvCity::changeDomainHealRate(DomainTypes eIndex, int iChange)
{
	FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
	FAssertMsg(eIndex < NUM_DOMAIN_TYPES, "eIndex expected to be < NUM_DOMAIN_TYPES");
	m_piDomainHealRate[eIndex] = (m_piDomainHealRate[eIndex] + iChange);
[COLOR="Red"]	FAssert(m_piDomainHealRate(eIndex) >= 0);[/COLOR]
}

int CvCity::getUnitClassHealRate(UnitClassTypes eIndex)
{
	FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
	FAssertMsg(eIndex < GC.getNumUnitClassInfos(), "eIndex expected to be < GC.getNumUnitClassInfos()");
	return m_piUnitClassHealRate[eIndex];
}

void CvCity::changeUnitClassHealRate(UnitClassTypes eIndex, int iChange)
{
	FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
	FAssertMsg(eIndex < GC.getNumUnitClassInfos(), "eIndex expected to be < GC.getNumUnitClassInfos()");
	m_piUnitClassHealRate[eIndex] = (m_piUnitClassHealRate[eIndex] + iChange);
[COLOR="red"]	FAssert(m_piUnitClassHealRate(eIndex) >= 0);[/COLOR]
}

int CvCity::getUnitCombatHealRate(UnitCombatTypes eIndex)
{
	FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
	FAssertMsg(eIndex < GC.getNumUnitCombatInfos(), "eIndex expected to be < GC.getNumUnitCombatInfos()");
	return m_piUnitCombatHealRate[eIndex];
}

void CvCity::changeUnitCombatHealRate(UnitCombatTypes eIndex, int iChange)
{
	FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
	FAssertMsg(eIndex < GC.getNumUnitCombatInfos(), "eIndex expected to be < GC.getNumUnitCombatInfos()");
	m_piUnitCombatHealRate[eIndex] = (m_piUnitCombatHealRate[eIndex] + iChange);
[COLOR="red"]	FAssert(m_piUnitCombatHealRate(eIndex) >= 0);[/COLOR]
}

Looking at the vanilla code around it, it seems to be in the same format, so I don't know what's wrong with this particular piece?
 
Tis a subtle but important typographical issue.

Compare these two:
m_piUnitClassHealRate[eIndex]
m_piUnitClassHealRate(eIndex)

Replace the ( and ) with [ and ]
 
Back
Top Bottom