Originally posted by Martin Gühmann
According to the crash.txt the crash is caused by something that is called by the BeginTurnImprovements method. Maybe you should recompile again or even better you should use the debug version of the executable.
According to the crash.txt the crash is caused by something that is called by the BeginTurnImprovements method. Maybe you should recompile again or even better you should use the debug version of the executable.
If you add a parameter to the parameter list of a function and you don't add the parameter in question everywhere it is used you get linker errors as you got.
-Martin
-Martin
on another note:
Code:
BOOL ArmyData::MoveIntoForeigner(const MapPoint &pos) { CellUnitList defender; g_theWorld->GetArmy(pos, defender); if(defender.Num() <= 0) return FALSE; BOOL i_died = FALSE; PLAYER_INDEX defense_owner = defender.GetOwner(); //EMOD if (AgreementMatrix::s_agreements.HasAgreement(defense_owner, m_owner, PROPOSAL_TREATY_DECLARE_WAR) && //outcommented because not called? // if (IsEnemy(defense_owner) && // !g_player[m_owner]->WillViolateCeaseFire(defense_owner) && // !g_player[m_owner]->WillViolatePact(defense_owner) && CanFight(defender)) { [i]...somecode...[/i] BOOL ArmyData::VerifyAttack(UNIT_ORDER_TYPE order, const MapPoint &pos, sint32 defense_owner) { //EMOD if (!AgreementMatrix::s_agreements.HasAgreement(defense_owner, m_owner, PROPOSAL_TREATY_DECLARE_WAR)) //outcommented original // if(IsEnemy(defense_owner) && // !g_player[m_owner]->WillViolateCeaseFire(defense_owner) && // !g_player[m_owner]->WillViolatePact(defense_owner)) // EMOD { SlicObject *so = new SlicObject("110bCantAttackHaveTreaty") ; so->AddRecipient(m_owner); so->AddCivilisation(defense_owner); so->AddUnit(m_array[0]); so->AddLocation(pos); so->AddOrder(order); g_slicEngine->Execute(so); g_selected_item->ForceDirectorSelect(Army(m_id)); return FALSE; } // end EMOD return TRUE; [i]...somecode...[/i]
Code:
alertBox '110bCantAttackHaveTreaty' { Text(ID_CANT_ATTACK_HAVE_TREATY); MessageType("DIPLOMATIC"); Button(ID_BUTTON_NO) { ClearOrders(unit[0]); Kill(); } Button(ID_BUTTON_YES) { //BreakAlliance(player[0]); DeclareWar(player[0]); AddOrder(unit[0], location[0]); Kill(); } }
Comment