here is the code, i moved the i value as you said
error still..
Spoiler :
Code:
//if (bDoImprove)
if (bDoImprove && eBestTempBuild == NO_BUILD) // K-Mod
{
int iBestTempBuildValue = MAX_INT; // K-Mod
for (int iJ = 0; iJ < GC.getNumBuildInfos(); iJ++)
{
BuildTypes eBuild = ((BuildTypes)iJ);
//if (GC.getBuildInfo(eBuild).getImprovement() != NO_IMPROVEMENT)
{
//if (GC.getImprovementInfo((ImprovementTypes) GC.getBuildInfo(eBuild).getImprovement()).isImprovementBonusTrade(eNonObsoleteBonus) || (!pLoopPlot->isCityRadius() && GC.getImprovementInfo((ImprovementTypes) GC.getBuildInfo(eBuild).getImprovement()).isActsAsCity()))
if (kOwner.doesImprovementConnectBonus((ImprovementTypes)GC.getBuildInfo(eBuild).getImprovement(), eNonObsoleteBonus)) // K-Mod
{
if (canBuild(pLoopPlot, eBuild))
{
if ((pLoopPlot->getFeatureType() == NO_FEATURE) || !GC.getBuildInfo(eBuild).isFeatureRemove(pLoopPlot->getFeatureType()) || !kOwner.isOption(PLAYEROPTION_LEAVE_FORESTS))
{
// Super Forts begin *AI_worker* - this should better determine the value of a build than the original code
if(GC.getDefineINT("SUPER_FORTS_SAFE_BUILD") != 0)
{
int iValue;
iValue = GC.getBuildInfo(eBuild).getTime();
if(GC.getBuildInfo(eBuild).isKill())
{
iValue += 10000;
}
if(GC.getImprovementInfo((ImprovementTypes)GC.getBuildInfo(eBuild).getImprovement()).isActsAsCity())
{
iValue /= 10;
}
}
else // Original Code is used if SUPER_FORTS_SAFE_BUILD is turned off
{
iValue = 10000; // Original Code
iValue /= (GC.getBuildInfo(eBuild).getTime() + 1); // Original Code
// XXX feature production???
}
// Super Forts end
int iValue;
if (iValue < iBestTempBuildValue)
{
iBestTempBuildValue = iValue;
eBestTempBuild = eBuild;
}
}
}
}
}
}
}
error still..
Spoiler :
1>CvUnitAI.cpp
1>CvUnitAI.cpp(21237) : error C2065: 'iValue' : undeclared identifier
1>CvUnitAI.cpp(21238) : error C3861: 'iValue': identifier not found, even with argument-dependent lookup
1>CvUnitAI.cpp(21237) : error C2065: 'iValue' : undeclared identifier
1>CvUnitAI.cpp(21238) : error C3861: 'iValue': identifier not found, even with argument-dependent lookup