I always play in debug mode so I've never worried about getting out of it. If you're playing the same game, did you do the 'ReloadSlic' ritual. Open up the chat screen (', apostrophe key) and then type: /reloadslic Then press 'return', and then 'return' again when the chat screen goes clear, to close it. I think that will get you out of debug mode, otherwise you'll probably have to start a new game.
I had an earlier version of the file with slightly fewer lines. I think I found the problem so here's how I corrected it, if Dale wants to use this:
The thing is that whenever you cycle through the Player array, it's a good idea to check whether the player you want to look at is in the game.
I had an earlier version of the file with slightly fewer lines. I think I found the problem so here's how I corrected it, if Dale wants to use this:
Code:
HandleEvent(BeginTurn) 'WDT_MainRoutine' pre { int_t tmpVal; city_t tmpCity; tmpVal = 0; for(WDT_civ = 0; WDT_civ < WDT_NumOfPlayers; WDT_civ = WDT_civ + 1) { if (IsPlayerAlive(WDT_civ)){ if( !(IsHumanPlayer(player[0])) && WDT_civ != player[0] && HasAgreement(player[0], WDT_civ, 3)) { WDT_numoftroops = player[0].units; for(WDT_count = 0; WDT_count < WDT_numoftroops; WDT_count = WDT_count + 1) { GetUnitByIndex(player[0], WDT_count, WDT_tmpunit); if(CellOwner(WDT_tmpunit.location) == WDT_civ && GetAgreementDuration(player[0], WDT_civ, 3) >= 5) { WDT_tmploc = WDT_tmpunit.location; AddCenter(WDT_tmploc); WDT_waterunit = 0; if(TerrainType(WDT_tmploc) >= 10 && TerrainType(WDT_tmploc) <= 17) { WDT_waterunit = 1; } WDT_veteran = 0; if(IsVeteran(WDT_tmpunit)) { WDT_veteran = 1; } if(!(IsCivilian(WDT_tmpunit)) && WDT_waterunit != 1) { tmpVal = WDT_GetDistanceNearestCity(WDT_tmploc, player[0]); GetCityByIndex(player[0], tmpVal, tmpCity); WDT_tmploc = tmpCity.location; AddEffect(WDT_tmpunit.location, "SPECEFFECT_DIPLOMATIC", "SOUND_ID_EXPEL"); WDT_tmptype = WDT_tmpunit.type; Event: DisbandUnit(WDT_tmpunit); CreateUnit(player[0], WDT_tmptype, WDT_tmploc, 2, WDT_tmpunit2); if(WDT_veteran == 1) { ToggleVeteran(WDT_tmpunit2, 1); } } } } } } } }
Comment