Archids Slavery Mod

You have the int CvGlobals::getDefineINT(const char *,const int) const method defined twice:

Line 1288 from Better BTS AI
Line 1382 from Slavery, which I copied from Better BTS AI

The cure is to remove line 1382 introduced by the Slavery mod:
int getDefineINT( const char * szName, const int iDefault ) const; // From Better BTS AI - jdog5000
 
Yeah there were a few files where I struggled with the merging. Here is an example of the next problem, I have screwed something up in CvCity files and you know what they say, "Go big or go home" so with this screw up I went big :-D

I attached the city files. Again....Thanks :-D

Spoiler :
1>CvCity.cpp
1>CvCity.cpp(12253) : error C2601: 'CvCity::getTradeCity' : local function definitions are illegal
1>CvCity.cpp(12261) : error C2601: 'CvCity::getTradeRoutes' : local function definitions are illegal
1>CvCity.cpp(12277) : error C2601: 'CvCity::clearTradeRoutes' : local function definitions are illegal
1>CvCity.cpp(12297) : error C2601: 'CvCity::updateTradeRoutes' : local function definitions are illegal
1>CvCity.cpp(12383) : error C2601: 'CvCity::clearOrderQueue' : local function definitions are illegal
1>CvCity.cpp(12397) : error C2601: 'CvCity::pushOrder' : local function definitions are illegal
1>CvCity.cpp(12548) : error C2601: 'CvCity::popOrder' : local function definitions are illegal
1>CvCity.cpp(13015) : error C2601: 'CvCity::startHeadOrder' : local function definitions are illegal
1>CvCity.cpp(13031) : error C2601: 'CvCity::stopHeadOrder' : local function definitions are illegal
1>CvCity.cpp(13045) : error C2601: 'CvCity::getOrderQueueLength' : local function definitions are illegal
1>CvCity.cpp(13051) : error C2601: 'CvCity::getOrderFromQueue' : local function definitions are illegal
1>CvCity.cpp(13068) : error C2601: 'CvCity::nextOrderQueueNode' : local function definitions are illegal
1>CvCity.cpp(13074) : error C2601: 'CvCity::headOrderQueueNode' : local function definitions are illegal
1>CvCity.cpp(13079) : error C2601: 'CvCity::getNumOrdersQueued' : local function definitions are illegal
1>CvCity.cpp(13084) : error C2601: 'CvCity::getOrderData' : local function definitions are illegal
1>CvCity.cpp(13105) : error C2601: 'CvCity::setWallOverridePoints' : local function definitions are illegal
1>CvCity.cpp(13112) : error C2601: 'CvCity::getWallOverridePoints' : local function definitions are illegal
1>CvCity.cpp(13119) : error C2601: 'CvCity::doGrowth' : local function definitions are illegal
1>CvCity.cpp(13171) : error C2601: 'CvCity::doCulture' : local function definitions are illegal
1>CvCity.cpp(13233) : error C2601: 'CvCity::doPlotCultureTimes100' : local function definitions are illegal
1>CvCity.cpp(13327) : error C2601: 'CvCity::doCheckProduction' : local function definitions are illegal
1>CvCity.cpp(13466) : error C2601: 'CvCity::doProduction' : local function definitions are illegal
1>CvCity.cpp(13531) : error C2601: 'CvCity::doDecay' : local function definitions are illegal
1>CvCity.cpp(13590) : error C2601: 'CvCity::doReligion' : local function definitions are illegal
1>CvCity.cpp(13735) : error C2601: 'CvCity::doGreatPeople' : local function definitions are illegal
1>CvCity.cpp(13802) : error C2601: 'CvCity::doMeltdown' : local function definitions are illegal
1>CvCity.cpp(13848) : error C2601: 'CvCity::read' : local function definitions are illegal
1>CvCity.cpp(14121) : error C2601: 'CvCity::write' : local function definitions are illegal
1>CvCity.cpp(14390) : error C2601: 'CvCity::getVisibleBuildings' : local function definitions are illegal
1>CvCity.cpp(14449) : error C2267: 'natGetDeterministicRandom' : static functions with block scope are illegal
1>CvCity.cpp(14449) : error C2601: 'natGetDeterministicRandom' : local function definitions are illegal
1>CvCity.cpp(14455) : error C2601: 'CvCity::getVisibleEffects' : local function definitions are illegal
1>CvCity.cpp(14513) : error C2601: 'CvCity::getCityBillboardSizeIconColors' : local function definitions are illegal
1>CvCity.cpp(14558) : error C2601: 'CvCity::getCityBillboardProductionIcon' : local function definitions are illegal
1>CvCity.cpp(14610) : error C2601: 'CvCity::getFoodBarPercentages' : local function definitions are illegal
1>CvCity.cpp(14632) : error C2601: 'CvCity::getProductionBarPercentages' : local function definitions are illegal
1>CvCity.cpp(14652) : error C2601: 'CvCity::getBarBackgroundColor' : local function definitions are illegal
1>CvCity.cpp(14661) : error C2601: 'CvCity::isStarCity' : local function definitions are illegal
1>CvCity.cpp(14666) : error C2601: 'CvCity::isValidBuildingLocation' : local function definitions are illegal
1>CvCity.cpp(14698) : error C2601: 'CvCity::getTriggerValue' : local function definitions are illegal
1>CvCity.cpp(14883) : error C2601: 'CvCity::canApplyEvent' : local function definitions are illegal
1>CvCity.cpp(14973) : error C2601: 'CvCity::applyEvent' : local function definitions are illegal
1>CvCity.cpp(15156) : error C2601: 'CvCity::isEventOccured' : local function definitions are illegal
1>CvCity.cpp(15169) : error C2601: 'CvCity::setEventOccured' : local function definitions are illegal
1>CvCity.cpp(15191) : error C2601: 'CvCity::hasShrine' : local function definitions are illegal
1>CvCity.cpp(15211) : error C2601: 'CvCity::invalidatePopulationRankCache' : local function definitions are illegal
1>CvCity.cpp(15216) : error C2601: 'CvCity::invalidateYieldRankCache' : local function definitions are illegal
1>CvCity.cpp(15235) : error C2601: 'CvCity::invalidateCommerceRankCache' : local function definitions are illegal
1>CvCity.cpp(15252) : error C2601: 'CvCity::getBuildingYieldChange' : local function definitions are illegal
1>CvCity.cpp(15265) : error C2601: 'CvCity::setBuildingYieldChange' : local function definitions are illegal
1>CvCity.cpp(15317) : error C2601: 'CvCity::changeBuildingYieldChange' : local function definitions are illegal
1>CvCity.cpp(15322) : error C2601: 'CvCity::getBuildingCommerceChange' : local function definitions are illegal
1>CvCity.cpp(15335) : error C2601: 'CvCity::setBuildingCommerceChange' : local function definitions are illegal
1>CvCity.cpp(15371) : error C2601: 'CvCity::changeBuildingCommerceChange' : local function definitions are illegal
1>CvCity.cpp(15437) : error C2601: 'CvCity::setBuildingHappyChange' : local function definitions are illegal
1>CvCity.cpp(15509) : error C2601: 'CvCity::getBuildingHappyChange' : local function definitions are illegal
1>CvCity.cpp(15583) : error C2601: 'CvCity::setBuildingHealthChange' : local function definitions are illegal
1>CvCity.cpp(15654) : error C2601: 'CvCity::getBuildingHealthChange' : local function definitions are illegal
1>CvCity.cpp(15667) : error C2601: 'CvCity::liberate' : local function definitions are illegal
1>CvCity.cpp(15738) : error C2601: 'CvCity::getLiberationPlayer' : local function definitions are illegal
1>CvCity.cpp(15853) : error C2601: 'CvCity::getBestYieldAvailable' : local function definitions are illegal
1>CvCity.cpp(15891) : error C2601: 'CvCity::isAutoRaze' : local function definitions are illegal
1>CvCity.cpp(15914) : error C2601: 'CvCity::getMusicScriptId' : local function definitions are illegal
1>CvCity.cpp(15944) : error C2601: 'CvCity::getSoundscapeScriptId' : local function definitions are illegal
1>CvCity.cpp(15949) : error C2601: 'CvCity::cheat' : local function definitions are illegal
1>CvCity.cpp(15968) : error C2601: 'CvCity::getBuildQueue' : local function definitions are illegal
1>CvCity.cpp(16010) : error C2601: 'CvCity::checkBuildings' : local function definitions are illegal
1>CvCity.cpp(16076) : error C2601: 'CvCity::isDisabledBuilding' : local function definitions are illegal
1>CvCity.cpp(16083) : error C2601: 'CvCity::setDisabledBuilding' : local function definitions are illegal
1>CvCity.cpp(16101) : fatal error C1075: end of file found before the left brace '{' at 'CvCity.cpp(12132)' was matched
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\Release\BuildLog.htm"
1>CvGameCoreDLL - 72 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 

Attachments

  • CvCity.rar
    67.4 KB · Views: 70
You are missing a block of code...

The indentation of my code is out by an extra tab which won't have helped here...I'll fix that in my next planned update

Spoiler :
PHP:
void CvCity::setHasCorporation(CorporationTypes eIndex, bool bNewValue, bool bAnnounce, bool bArrows)
{
	FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
	FAssertMsg(eIndex < GC.getNumCorporationInfos(), "eIndex expected to be < GC.getNumCorporationInfos()");

	if (isHasCorporation(eIndex) != bNewValue)
	{
		if (bNewValue)
		{
			bool bReplacedHeadquarters = false;
			for (int iCorp = 0; iCorp < GC.getNumCorporationInfos(); ++iCorp)
			{ // <---********* Missing from here ********
				if (iCorp != eIndex && isHasCorporation((CorporationTypes)iCorp))
				{
					if (GC.getGameINLINE().isCompetingCorporation((CorporationTypes)iCorp, eIndex))
					{
						if (GC.getGameINLINE().getHeadquarters((CorporationTypes)iCorp) == this)
						{
							GC.getGameINLINE().replaceCorporation((CorporationTypes)iCorp, eIndex);
							bReplacedHeadquarters = true;
						}
						else
						{
							setHasCorporation((CorporationTypes)iCorp, false, false);
						}
					}
				}
			}

			if (bReplacedHeadquarters)
			{
				return; // already set the corporation in this city
			}
		} // <---******** to here ***********

/****************************************
 *  Archid Mod: 13 Jun 2012
 *  Functionality: Replaceable Buildings - Afforess
 *		
 *	Source:
 *	  RoM : AND
 *
 ****************************************/
			for (int iI = 0; iI < GC.getNumBuildingInfos(); iI++)
			{
				if (GC.getBuildingInfo((BuildingTypes)iI).getPrereqCorporation() == eIndex)
				{
					if (bNewValue && isDisabledBuilding((BuildingTypes)iI))
					{
						setDisabledBuilding((BuildingTypes)iI, false);
					}
					else if (!bNewValue && getNumBuilding((BuildingTypes)iI) > 0)
					{
						setDisabledBuilding((BuildingTypes)iI, true);
					}
				}
			}
/**
 ** End: Replaceable Buildings
 **/

		m_pabHasCorporation[eIndex] = bNewValue;
 
cool I shall try and get that found and added :-D

I am so glad you are helping me with this I never would have figured this out on my own hehe

ok fixed that :-D My failures are getting bigger with each file :) that is growth right??
next up game text manager 104 errors!!!

Spoiler :
1>CvGameTextMgr.cpp
1>CvGameTextMgr.cpp(7823) : error C2601: 'CvGameTextMgr::setTechHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(8260) : error C2601: 'CvGameTextMgr::setBasicUnitHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(9047) : error C2601: 'CvGameTextMgr::setUnitHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(9475) : error C2601: 'CvGameTextMgr::setBuildingHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(9483) : error C2601: 'CvGameTextMgr::setBuildingNetEffectsHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(9545) : error C2601: 'CvGameTextMgr::setBuildingHelpActual' : local function definitions are illegal
1>CvGameTextMgr.cpp(10973) : error C2601: 'CvGameTextMgr::buildBuildingRequiresString' : local function definitions are illegal
1>CvGameTextMgr.cpp(11335) : error C2601: 'CvGameTextMgr::setProjectHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(11623) : error C2601: 'CvGameTextMgr::setProcessHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(11639) : error C2601: 'CvGameTextMgr::setBadHealthHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(11764) : error C2601: 'CvGameTextMgr::setGoodHealthHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(11862) : error C2601: 'CvGameTextMgr::setBuildingAdditionalHealthHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(11899) : error C2601: 'CvGameTextMgr::setAngerHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12187) : error C2601: 'CvGameTextMgr::setHappyHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12319) : error C2601: 'CvGameTextMgr::setBuildingAdditionalHappinessHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12440) : error C2601: 'CvGameTextMgr::setYieldChangeHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12449) : error C2601: 'CvGameTextMgr::setResumableYieldChangeHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12498) : error C2601: 'CvGameTextMgr::setCommerceChangeHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12507) : error C2601: 'CvGameTextMgr::setResumableCommerceChangeHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12549) : error C2601: 'CvGameTextMgr::setCommerceTimes100ChangeHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12558) : error C2601: 'CvGameTextMgr::setResumableCommerceTimes100ChangeHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12615) : error C2601: 'CvGameTextMgr::setResumableGoodBadChangeHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12627) : error C2601: 'CvGameTextMgr::setResumableValueChangeHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12660) : error C2601: 'CvGameTextMgr::setResumableValueTimes100ChangeHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12707) : error C2601: 'CvGameTextMgr::setBonusHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12827) : error C2601: 'CvGameTextMgr::setReligionHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(12881) : error C2601: 'CvGameTextMgr::setReligionHelpCity' : local function definitions are illegal
1>CvGameTextMgr.cpp(13031) : error C2601: 'CvGameTextMgr::setCorporationHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(13219) : error C2601: 'CvGameTextMgr::setCorporationHelpCity' : local function definitions are illegal
1>CvGameTextMgr.cpp(13380) : error C2601: 'CvGameTextMgr::buildObsoleteString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13391) : error C2601: 'CvGameTextMgr::buildObsoleteBonusString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13402) : error C2601: 'CvGameTextMgr::buildObsoleteSpecialString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13413) : error C2601: 'CvGameTextMgr::buildMoveString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13434) : error C2601: 'CvGameTextMgr::buildFreeUnitString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13462) : error C2601: 'CvGameTextMgr::buildFeatureProductionString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13474) : error C2601: 'CvGameTextMgr::buildWorkerRateString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13486) : error C2601: 'CvGameTextMgr::buildTradeRouteString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13498) : error C2601: 'CvGameTextMgr::buildHealthRateString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13510) : error C2601: 'CvGameTextMgr::buildHappinessRateString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13522) : error C2601: 'CvGameTextMgr::buildFreeTechString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13545) : error C2601: 'CvGameTextMgr::buildLOSString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13557) : error C2601: 'CvGameTextMgr::buildMapCenterString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13569) : error C2601: 'CvGameTextMgr::buildMapRevealString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13581) : error C2601: 'CvGameTextMgr::buildMapTradeString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13593) : error C2601: 'CvGameTextMgr::buildTechTradeString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13605) : error C2601: 'CvGameTextMgr::buildGoldTradeString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13617) : error C2601: 'CvGameTextMgr::buildOpenBordersString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13629) : error C2601: 'CvGameTextMgr::buildDefensivePactString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13641) : error C2601: 'CvGameTextMgr::buildPermanentAllianceString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13653) : error C2601: 'CvGameTextMgr::buildVassalStateString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13665) : error C2601: 'CvGameTextMgr::buildBridgeString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13677) : error C2601: 'CvGameTextMgr::buildIrrigationString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13689) : error C2601: 'CvGameTextMgr::buildIgnoreIrrigationString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13701) : error C2601: 'CvGameTextMgr::buildWaterWorkString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13713) : error C2601: 'CvGameTextMgr::buildImprovementString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13749) : error C2601: 'CvGameTextMgr::buildDomainExtraMovesString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13762) : error C2601: 'CvGameTextMgr::buildAdjustString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13774) : error C2601: 'CvGameTextMgr::buildTerrainTradeString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13786) : error C2601: 'CvGameTextMgr::buildRiverTradeString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13798) : error C2601: 'CvGameTextMgr::buildSpecialBuildingString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13819) : error C2601: 'CvGameTextMgr::buildYieldChangeString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13834) : error C2601: 'CvGameTextMgr::buildBonusRevealString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13851) : error C2601: 'CvGameTextMgr::buildCivicRevealString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13868) : error C2601: 'CvGameTextMgr::buildProcessInfoString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13885) : error C2601: 'CvGameTextMgr::buildFoundReligionString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13913) : error C2601: 'CvGameTextMgr::buildFoundCorporationString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13933) : error C2601: 'CvGameTextMgr::buildPromotionString' : local function definitions are illegal
1>CvGameTextMgr.cpp(13951) : error C2601: 'CvGameTextMgr::buildSingleLineTechTreeString' : local function definitions are illegal
1>CvGameTextMgr.cpp(14008) : error C2601: 'CvGameTextMgr::buildTechTreeString' : local function definitions are illegal
1>CvGameTextMgr.cpp(14116) : error C2601: 'CvGameTextMgr::setPromotionHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(14135) : error C2601: 'CvGameTextMgr::setUnitCombatHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(14140) : error C2601: 'CvGameTextMgr::setImprovementHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(14294) : error C2601: 'CvGameTextMgr::getDealString' : local function definitions are illegal
1>CvGameTextMgr.cpp(14305) : error C2601: 'CvGameTextMgr::getDealString' : local function definitions are illegal
1>CvGameTextMgr.cpp(14391) : error C2601: 'CvGameTextMgr::getWarplanString' : local function definitions are illegal
1>CvGameTextMgr.cpp(14407) : error C2601: 'CvGameTextMgr::getAttitudeString' : local function definitions are illegal
1>CvGameTextMgr.cpp(14607) : error C2601: 'CvGameTextMgr::getWarWearinessString' : local function definitions are illegal
1>CvGameTextMgr.cpp(14641) : error C2601: 'CvGameTextMgr::getEspionageString' : local function definitions are illegal
1>CvGameTextMgr.cpp(14655) : error C2601: 'CvGameTextMgr::getTradeString' : local function definitions are illegal
1>CvGameTextMgr.cpp(14712) : error C2601: 'CvGameTextMgr::setFeatureHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(14806) : error C2601: 'CvGameTextMgr::setTerrainHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(14877) : error C2601: 'CvGameTextMgr::buildFinanceInflationString' : local function definitions are illegal
1>CvGameTextMgr.cpp(14894) : error C2601: 'CvGameTextMgr::buildFinanceUnitCostString' : local function definitions are illegal
1>CvGameTextMgr.cpp(14937) : error C2601: 'CvGameTextMgr::buildFinanceAwaySupplyString' : local function definitions are illegal
1>CvGameTextMgr.cpp(14962) : error C2601: 'CvGameTextMgr::buildFinanceCityMaintString' : local function definitions are illegal
1>CvGameTextMgr.cpp(15006) : error C2601: 'CvGameTextMgr::buildFinanceCivicUpkeepString' : local function definitions are illegal
1>CvGameTextMgr.cpp(15029) : error C2601: 'CvGameTextMgr::buildFinanceForeignIncomeString' : local function definitions are illegal
1>CvGameTextMgr.cpp(15056) : error C2601: 'CvGameTextMgr::setBuildingAdditionalYieldHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(15089) : error C2601: 'CvGameTextMgr::setBuildingAdditionalCommerceHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(15122) : error C2601: 'CvGameTextMgr::setBuildingSavedMaintenanceHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(15154) : error C2601: 'CvGameTextMgr::setProductionHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(15416) : error C2601: 'CvGameTextMgr::parsePlayerTraits' : local function definitions are illegal
1>CvGameTextMgr.cpp(15444) : error C2601: 'CvGameTextMgr::parseLeaderHeadHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(15527) : error C2601: 'CvGameTextMgr::parseLeaderLineHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(15567) : error C2601: 'CvGameTextMgr::getActiveDealsString' : local function definitions are illegal
1>CvGameTextMgr.cpp(15584) : error C2601: 'CvGameTextMgr::getOtherRelationsString' : local function definitions are illegal
1>CvGameTextMgr.cpp(15684) : error C2601: 'CvGameTextMgr::buildHintsList' : local function definitions are illegal
1>CvGameTextMgr.cpp(15694) : error C2601: 'CvGameTextMgr::setCommerceHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(15927) : error C2601: 'CvGameTextMgr::setYieldHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(16045) : error C2601: 'CvGameTextMgr::setConvertHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(16073) : error C2601: 'CvGameTextMgr::setRevolutionHelp' : local function definitions are illegal
1>CvGameTextMgr.cpp(16073) : fatal error C1003: error count exceeds 100; stopping compilation
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\Release\BuildLog.htm"
1>CvGameCoreDLL - 104 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 

Attachments

  • CvGameTextMgr.rar
    81.5 KB · Views: 56
You are missing a closing brace in parseCivicInfo

Search for TXT_KEY_CIVIC_MILITARY_SUPPORT_COSTS to jump there

Spoiler :
PHP:
	//	Gold cost per military unit
	if (GC.getCivicInfo(eCivic).getGoldPerMilitaryUnit() != 0)
	{
		/* szHelpText.append(NEWLINE);
		szHelpText.append(gDLL->getText("TXT_KEY_CIVIC_MILITARY_SUPPORT_COSTS", (GC.getCivicInfo(eCivic).getGoldPerMilitaryUnit() > 0), GC.getCommerceInfo(COMMERCE_GOLD).getChar())); */
		// K-Mod
		szHelpText.append(CvWString::format(L"\n%c%+.2f%c %s", gDLL->getSymbolID(BULLET_CHAR), (float)GC.getCivicInfo(eCivic).getGoldPerMilitaryUnit()/100, GC.getCommerceInfo(COMMERCE_GOLD).getChar(),
			gDLL->getText("TXT_KEY_CIVIC_MILITARY_SUPPORT_COSTS").GetCString()));
		// K-Mod end
	} // <-- *********** Missing this closing brace *********
/****************************************
 *  Archid Mod: 10 Jun 2012
 *  Functionality: Slavery Archid
 *	  Building Prereqs
 *	Source:
 *	  Building Prereqs - Afforess
 *
 ****************************************/
	BuildingTypes eLoopBuilding;
	bFirst = true;
In general when you get a local function definitions are illegal error it means you have problems with the braces in the file. To identify where in VC++ 2008 look for the first of the methods mentioned in the error log, which in you case was:
Code:
1>CvGameTextMgr.cpp(7823) : error C2601: 'CvGameTextMgr::setTechHelp' : local function definitions are illegal
The format of an output error message can be interpreted as:
<Filename> (<line number>) : <error code>: <error details>

The error for you was therefore on line 7823, which is the CvGameTextMgr::setTechHelp method.

As local function definitions are illegal errors mean that you are missing a closing brace it is something just above this line. So you need to look at the method above and work out which block is not closed properly. The outlining feature in VC++ is your friend here. I suggest you have a quick read up on how to use it as it can collapse all the blocks in a method to show you the one that isn't closed as you expect.
 
Am I right in thinking that these issues are not with the .cpp file but with the .h file as this is an undeclared identifier?

Spoiler :
1>CvPlayerAI.cpp
1>CvPlayerAI.cpp(6457) : error C2065: 'iUnitValue' : undeclared identifier
1>CvPlayerAI.cpp(6462) : error C2065: 'iMilitaryValue' : undeclared identifier
1>CvPlayerAI.cpp(6463) : error C3861: 'iMilitaryValue': identifier not found, even with argument-dependent lookup
1>CvPlayerAI.cpp(6464) : error C3861: 'iUnitValue': identifier not found, even with argument-dependent lookup
1>CvPlayerAI.cpp(23258) : error C2065: 'pLoopUnit' : undeclared identifier
1>CvPlayerAI.cpp(23258) : error C2227: left of '->getGameTurnCreated' must point to class/struct/union
1> type is ''unknown-type''
1>CvPlayerAI.cpp(23260) : error C2227: left of '->plot' must point to class/struct/union
1> type is ''unknown-type''
1>CvPlayerAI.cpp(23260) : error C2227: left of '->isCity' must point to class/struct/union
1>CvPlayerAI.cpp(23260) : error C3861: 'pLoopUnit': identifier not found, even with argument-dependent lookup
1>CvPlayerAI.cpp(23262) : error C2227: left of '->plot' must point to class/struct/union
1> type is ''unknown-type''
1>CvPlayerAI.cpp(23262) : error C2227: left of '->getPlotCity' must point to class/struct/union
1>CvPlayerAI.cpp(23262) : error C2227: left of '->AI_getWorkersNeeded' must point to class/struct/union
1>CvPlayerAI.cpp(23262) : error C3861: 'pLoopUnit': identifier not found, even with argument-dependent lookup
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\Release\BuildLog.htm"
1>CvGameCoreDLL - 15 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
This is the code that the first error is refering to:

Code:
												case UNITAI_SLAVE:
													iUnitValue += 400;
													break;

												// Slavers have value in both peace and war
												case UNITAI_SLAVER:
													iMilitaryValue += ((bWarPlan) ? 600 : 300);
													iMilitaryValue += (AI_isDoStrategy(AI_STRATEGY_DAGGER ) ? 800 : 0);
													iUnitValue += ((!bCapitalAlone) ? 400 : 100);
													break;
/**
 ** End: Slavery
 **/
				case UNITAI_ATTACK:
					iOffenceValue = std::max(iOffenceValue, (bWarPlan ? 7 : 4)*iWeight + (AI_isDoStrategy(AI_STRATEGY_DAGGER) ? 5*iWeight : 0));
					iTotalUnitValue += 1*iWeight;
					break;

could it be the extra indentations that are causing the issue?

I located the second set of errors too, I am just not sure what the errors mean and what exactly to do to fix them, I don't want to go back to random changing in case I make it worse :-D

Sorry for being a pain I really do appreciate your help on this :-D This mod comp will be great for my mod! :-D
 
Sometimes...

Most of the variables that are defined in the .h files will begin with m_ to indicate that they have modular scope, which means they can be referenced anywhere in the cpp file. The compiler doesn't care though so its not a hard and fast rule, but most, not all, of the code that I have seen floating around for Civ IV follows the convention. If the prefix is not there I tend to look in the method that the error occurs first.

Looking at the names of the variables: iUnitValue & iMilitaryValue I would supect are temporary variables to keep track of a number before it is used so would be defined in the method. The pLoopUnit I wouls say is very highly likely to be defined in the method in the cpp file as loop variables tend to be very temporary in scope and this should probably be defined right above where it is set.
 
could it be the extra indentations that are causing the issue?

Whitespace (tabs, spaces, carriage returns, etc) are totally ignored by the compiler and are only used to make it easier for us mere mortals to read the code.

Your line numbers don't match up with my code and the place where I have that piece of code doesn't look to be the same place. I would need to see your source files again to try and work out what is wrong, but I suspect that the whole Slavery block of code is in the wrong place in the file.
 
I see the problem, the K mod totally changes the AI routines and weighting strategy.
You had put the code in the right places, it just needed adjusting to match the variable names used by the K mod. I have updated the AI values as well so the weighting used should be balanced with the surrounding code.

The first block of code around line 6457 should be changed to this:
Spoiler :
PHP:
				case UNITAI_WORKER:
					iUtilityValue = std::max(iUtilityValue, 8*iWeight);
					break;
/****************************************
 *  Archid Mod: 12 May 2012
 *  Functionality: Slavery - Archid
 *		Slave AI
 *		Slaver AI
 *	Source:
 *	  Archid
 *
 ****************************************/
				case UNITAI_SLAVE:
					iUtilityValue = std::max(iUtilityValue, 4*iWeight);
					break;

				// Slavers have value in both peace and war
				case UNITAI_SLAVER:
					iOffenceValue = std::max(iOffenceValue, (bWarPlan ? 7 : 4)*iWeight + (AI_isDoStrategy(AI_STRATEGY_DAGGER) ? 5*iWeight : 0));
					iUtilityValue = std::max(iUtilityValue, (bCapitalAlone ? 1 : 2)*iWeight);
					iTotalUnitValue += 1*iWeight;
					break;
/**
 ** End: Slavery
 **/
				case UNITAI_ATTACK:
					iOffenceValue = std::max(iOffenceValue, (bWarPlan ? 7 : 4)*iWeight + (AI_isDoStrategy(AI_STRATEGY_DAGGER) ? 5*iWeight : 0));
					iTotalUnitValue += 1*iWeight;
					break;
The second block of code around line 23258 should be:
Spoiler :
PHP:
	case UNITAI_WORKER:
		if (GC.getGame().getGameTurn() - pUnit->getGameTurnCreated() <= 10 ||
			!pUnit->plot()->isCity() ||
			pUnit->plot()->getPlotCity()->AI_getWorkersNeeded() > 0)
		{
			iValue *= 10;
		}
		break;
		
/****************************************
 *  Archid Mod: 12 May 2012
 *  Functionality: Slavery - Archid
 *		Slave AI
 *		Slaver AI
 *	Source:
 *	  Archid
 *
 ****************************************/
	case UNITAI_SLAVE:
		if ((GC.getGame().getGameTurn() - pUnit->getGameTurnCreated()) > 10)
		{
			if (pUnit->plot()->isCity())
			{
				if (pUnit->plot()->getPlotCity()->AI_getWorkersNeeded() == 0)
				{
					// Low value as slaves are used up on use so don't drain the treasury for long
					iValue *= 2;
				}
			}
		}
		break;

	case UNITAI_SLAVER:
		iValue *= 3;
		break;
/**
 ** End: Slavery
 **/

	case UNITAI_ATTACK:
	case UNITAI_COUNTER:
		iValue *= 4;
		break;
This code may need tweaking, but I think it should compile and is pretty much inline with the AI values around it.
 
Spoiler :
1>CvSelectionGroup.cpp
1>CvSelectionGroup.cpp(852) : error C2065: 'pLoopUnit' : undeclared identifier
1>CvSelectionGroup.cpp(852) : error C2227: left of '->canSellSlave' must point to class/struct/union
1> type is ''unknown-type''
1>CvSelectionGroup.cpp(852) : error C2065: 'pPlot' : undeclared identifier
1>CvSelectionGroup.cpp(854) : error C2562: 'CvSelectionGroup::startMission' : 'void' function returning a value
1> c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\CvSelectionGroup.h(46) : see declaration of 'CvSelectionGroup::startMission'
1>CvSelectionGroup.cpp(1496) : error C2227: left of '->sellSlaves' must point to class/struct/union
1> type is ''unknown-type''
1>CvSelectionGroup.cpp(1496) : error C3861: 'pLoopUnit': identifier not found, even with argument-dependent lookup
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\Release\BuildLog.htm"
1>CvGameCoreDLL - 8 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Oh man I thought we had it that time, I think this is another code compatibility issue..

I can't thankyou enough for your help on this mate, other wise it would just be another fail on a long list.

If you ever need any custom voice work for your mod, say the word and I am on it!
 

Attachments

  • CvSelectionGroup.rar
    26.6 KB · Views: 51
There are a few changes that need to be made in this file so instead of listing them I have attached the updated file. You can use WinDiff to see what I have done.

Its not easy merging SDK mods when the target has been extensively modified from the core. It is good to see that the mod is getting some use and it would require a lot more helping others before I come close to giving back what I have taken from this forum.
 

Attachments

  • CvSelectionGroup.7z
    22 KB · Views: 63
Me Again! :-D
Only 4 errors this time! and I got through 2! Whole files without there being an issue! WOW!!

Spoiler :
1>CvUnitAI.cpp
1>CvUnitAI.cpp(2100) : error C2039: 'AI_getOurPlotStrength' : is not a member of 'CvPlayerAI'
1> c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\CvPlayerAI.h(13) : see declaration of 'CvPlayerAI'
1>CvUnitAI.cpp(2260) : error C3861: 'AI_finalOddsThreshold': identifier not found, even with argument-dependent lookup
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\Release\BuildLog.htm"
1>CvGameCoreDLL - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Yeah I really wanted to have BUG in my mod, just because it is awesome :) and I miss it in all the mods that I play without it now hehe :)

I know what you mean about the community here, everyone I have talked to is really helpful, and I think I have had only one troll since joining :p

I really think this slave mod is going to be a real stand out piece of my fallout mod though, I was going to make slaves much more basic, and just have them as a specialist, but this really makes it more involved and interesting and opens up some more interesting choices and play.

Especially since an entire faction is called the raiders and slavers! Will be nice to have some actual slavers running around :)
 

Attachments

  • CvUnitAI.rar
    103.3 KB · Views: 70
The first error here indicates the AI_getOurPlotStrength method is missing from CvPlayerAI which is odd as this method is in the base BTS 3.19 code and not anything I have added. Is this something else that the K mod has changed?
 
it could well be yeah, K-mod deals mostly with AI improvements, so any thing AI files have probably changed in one way or another, I did a quick skim trhough searching AI_get, but it didn't seem to turn much up, the only 'plot' related one I found was getplotdanger which was to do with keeping workers off the front lines.

I've attached the playerAI files, just in case you have a better idea of what/where you are looking for it.

Yeah that section of code seems to have been removed, but as yet I cannot figure out what replaced it, the code above and below it is still there, but there is nothing 'in between' them now? I am still looking..

I will see if I can contact karadoc as well to see if he can help us unravel the mystery!
 

Attachments

  • CvPlayerAI.rar
    128.6 KB · Views: 64
Top Bottom