diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index f8e79a43..841cc066 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -1683,12 +1683,12 @@ void Game::setupPopupMenus(bool checkClientAdminOverrideOnly) { menuItems.push_back(lang.getString("PauseResumeGame")); pauseGamePopupMenuIndex= (int)menuItems.size() - 1; - if(gameSettings.isNetworkGame() == false){ + if(gameSettings.isNetworkGame() == false || gameSettings.getScenario() != "") { menuItems.push_back(lang.getString("SaveGame")); saveGamePopupMenuIndex= (int)menuItems.size() - 1; } - if(gameSettings.isNetworkGame() == true){ + if(gameSettings.isNetworkGame() == true) { menuItems.push_back(lang.getString("DisconnectNetorkPlayer")); disconnectPlayerPopupMenuIndex= (int)menuItems.size() - 1; } diff --git a/source/glest_game/game/game_settings.h b/source/glest_game/game/game_settings.h index 521398c0..e5445fe4 100644 --- a/source/glest_game/game/game_settings.h +++ b/source/glest_game/game/game_settings.h @@ -328,7 +328,7 @@ public: bool result = false; for(int idx = 0; idx < GameConstants::maxPlayers; ++idx) { if(factionControls[idx] == ctNetwork || factionControls[idx] == ctNetworkUnassigned || - networkPlayerStatuses[idx] == npst_Disconnected) { + networkPlayerStatuses[idx] == npst_Disconnected) { result = true; break; } diff --git a/source/glest_game/game/script_manager.cpp b/source/glest_game/game/script_manager.cpp index 29f98d4e..b76499a4 100644 --- a/source/glest_game/game/script_manager.cpp +++ b/source/glest_game/game/script_manager.cpp @@ -457,7 +457,7 @@ void ScriptManager::init(World* world, GameCamera *gameCamera, const XmlNode *ro //if(ex.wantStackTrace() == true) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); //} SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -492,13 +492,14 @@ void ScriptManager::onMessageBoxOk(bool popFront) { messageBox.setEnabled(true); - string msgText = messageQueue.front().getText(); + string msgText = wrapString(messageQueue.front().getText(), messageWrapCount); string msgHeader = messageQueue.front().getHeader(); if(messageQueue.front().getMessageNotTranslated() == false) { - msgText = lang.getScenarioString(messageQueue.front().getText()); + + msgText = wrapString(lang.getScenarioString(messageQueue.front().getText()), messageWrapCount); msgHeader = lang.getScenarioString(messageQueue.front().getHeader()); } - messageBox.setText(wrapString(msgText, messageWrapCount)); + messageBox.setText(msgText); messageBox.setHeader(msgHeader); break; } @@ -1991,7 +1992,7 @@ int ScriptManager::networkShowMessageForFaction(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2012,7 +2013,7 @@ int ScriptManager::networkShowMessageForTeam(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2033,7 +2034,7 @@ int ScriptManager::networkSetCameraPositionForFaction(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2054,7 +2055,7 @@ int ScriptManager::networkSetCameraPositionForTeam(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2076,7 +2077,7 @@ int ScriptManager::setDisplayText(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2097,7 +2098,7 @@ int ScriptManager::addConsoleText(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2118,7 +2119,7 @@ int ScriptManager::clearDisplayText(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2139,7 +2140,7 @@ int ScriptManager::setCameraPosition(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2165,7 +2166,7 @@ int ScriptManager::createUnit(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2191,7 +2192,7 @@ int ScriptManager::createUnitNoSpacing(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2214,7 +2215,7 @@ int ScriptManager::destroyUnit(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2236,7 +2237,7 @@ int ScriptManager::giveKills(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2259,7 +2260,7 @@ int ScriptManager::morphToUnit(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2282,7 +2283,7 @@ int ScriptManager::moveToUnit(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2304,7 +2305,7 @@ int ScriptManager::playStaticSound(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2326,7 +2327,7 @@ int ScriptManager::playStreamingSound(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2348,7 +2349,7 @@ int ScriptManager::stopStreamingSound(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2370,7 +2371,7 @@ int ScriptManager::stopAllSound(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2392,7 +2393,7 @@ int ScriptManager::playStaticVideo(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2414,7 +2415,7 @@ int ScriptManager::playStreamingVideo(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2436,7 +2437,7 @@ int ScriptManager::stopStreamingVideo(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2459,7 +2460,7 @@ int ScriptManager::stopAllVideo(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2481,7 +2482,7 @@ int ScriptManager::togglePauseGame(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2500,7 +2501,7 @@ int ScriptManager::giveResource(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2523,7 +2524,7 @@ int ScriptManager::givePositionCommand(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2545,7 +2546,7 @@ int ScriptManager::giveAttackCommand(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2567,7 +2568,7 @@ int ScriptManager::giveProductionCommand(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2589,7 +2590,7 @@ int ScriptManager::giveUpgradeCommand(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2612,7 +2613,7 @@ int ScriptManager::giveAttackStoppedCommand(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2632,7 +2633,7 @@ int ScriptManager::disableAi(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2652,7 +2653,7 @@ int ScriptManager::enableAi(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2673,7 +2674,7 @@ int ScriptManager::getAiEnabled(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2693,7 +2694,7 @@ int ScriptManager::disableConsume(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2713,7 +2714,7 @@ int ScriptManager::enableConsume(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2734,7 +2735,7 @@ int ScriptManager::getConsumeEnabled(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2755,7 +2756,7 @@ int ScriptManager::registerCellTriggerEventForUnitToUnit(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2776,7 +2777,7 @@ int ScriptManager::registerCellTriggerEventForUnitToLocation(LuaHandle* luaHandl catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2797,7 +2798,7 @@ int ScriptManager::registerCellAreaTriggerEventForUnitToLocation(LuaHandle* luaH catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2818,7 +2819,7 @@ int ScriptManager::registerCellTriggerEventForFactionToUnit(LuaHandle* luaHandle catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2839,7 +2840,7 @@ int ScriptManager::registerCellTriggerEventForFactionToLocation(LuaHandle* luaHa catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2860,7 +2861,7 @@ int ScriptManager::registerCellAreaTriggerEventForFactionToLocation(LuaHandle* l catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2881,7 +2882,7 @@ int ScriptManager::registerCellAreaTriggerEvent(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2902,7 +2903,7 @@ int ScriptManager::getCellTriggerEventCount(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2922,7 +2923,7 @@ int ScriptManager::unregisterCellTriggerEvent(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2943,7 +2944,7 @@ int ScriptManager::startTimerEvent(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2964,7 +2965,7 @@ int ScriptManager::startEfficientTimerEvent(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -2985,7 +2986,7 @@ int ScriptManager::stopTimerEvent(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3006,7 +3007,7 @@ int ScriptManager::resetTimerEvent(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3027,7 +3028,7 @@ int ScriptManager::getTimerEventSecondsElapsed(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3047,7 +3048,7 @@ int ScriptManager::setPlayerAsWinner(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3067,7 +3068,7 @@ int ScriptManager::endGame(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3087,7 +3088,7 @@ int ScriptManager::startPerformanceTimer(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3107,7 +3108,7 @@ int ScriptManager::endPerformanceTimer(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3128,7 +3129,7 @@ int ScriptManager::getPerformanceTimerResults(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3149,7 +3150,7 @@ int ScriptManager::getStartLocation(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3170,7 +3171,7 @@ int ScriptManager::getUnitPosition(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3190,7 +3191,7 @@ int ScriptManager::setUnitPosition(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3229,7 +3230,7 @@ int ScriptManager::addCellMarker(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3253,7 +3254,7 @@ int ScriptManager::removeCellMarker(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3293,7 +3294,7 @@ int ScriptManager::showMarker(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3314,7 +3315,7 @@ int ScriptManager::getUnitFaction(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3334,7 +3335,7 @@ int ScriptManager::getUnitName(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3354,7 +3355,7 @@ int ScriptManager::getResourceAmount(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3374,7 +3375,7 @@ int ScriptManager::getLastCreatedUnitName(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3394,7 +3395,7 @@ int ScriptManager::getLastCreatedUnitId(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3414,7 +3415,7 @@ int ScriptManager::getCellTriggeredEventId(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3434,7 +3435,7 @@ int ScriptManager::getTimerTriggeredEventId(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3454,7 +3455,7 @@ int ScriptManager::getCellTriggeredEventAreaEntryUnitId(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3474,7 +3475,7 @@ int ScriptManager::getCellTriggeredEventAreaExitUnitId(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3494,7 +3495,7 @@ int ScriptManager::getCellTriggeredEventUnitId(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3514,7 +3515,7 @@ int ScriptManager::setRandomGenInit(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3534,7 +3535,7 @@ int ScriptManager::getRandomGen(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3554,7 +3555,7 @@ int ScriptManager::getWorldFrameCount(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3574,7 +3575,7 @@ int ScriptManager::getLastDeadUnitName(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3594,7 +3595,7 @@ int ScriptManager::getLastDeadUnitId(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3614,7 +3615,7 @@ int ScriptManager::getLastDeadUnitCauseOfDeath(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3634,7 +3635,7 @@ int ScriptManager::getLastDeadUnitKillerName(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3654,7 +3655,7 @@ int ScriptManager::getLastDeadUnitKillerId(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3674,7 +3675,7 @@ int ScriptManager::getLastAttackedUnitName(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3694,7 +3695,7 @@ int ScriptManager::getLastAttackedUnitId(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3714,7 +3715,7 @@ int ScriptManager::getLastAttackingUnitName(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3734,7 +3735,7 @@ int ScriptManager::getLastAttackingUnitId(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3754,7 +3755,7 @@ int ScriptManager::getSystemMacroValue(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3774,7 +3775,7 @@ int ScriptManager::scenarioDir(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3794,7 +3795,7 @@ int ScriptManager::getPlayerName(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3814,7 +3815,7 @@ int ScriptManager::getUnitCount(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3834,7 +3835,7 @@ int ScriptManager::getUnitCountOfType(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -3929,7 +3930,7 @@ int ScriptManager::DisplayFormattedText(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4052,7 +4053,7 @@ int ScriptManager::addConsoleLangText(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4148,7 +4149,7 @@ int ScriptManager::DisplayFormattedLangText(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4168,7 +4169,7 @@ int ScriptManager::getGameWon(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4188,7 +4189,7 @@ int ScriptManager::getIsGameOver(LuaHandle* luaHandle){ catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4208,7 +4209,7 @@ int ScriptManager::loadScenario(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4229,7 +4230,7 @@ int ScriptManager::getUnitsForFaction(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4250,7 +4251,7 @@ int ScriptManager::getUnitCurrentField(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4270,7 +4271,7 @@ int ScriptManager::getIsUnitAlive(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4296,7 +4297,7 @@ int ScriptManager::isFreeCellsOrHasUnit(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4322,7 +4323,7 @@ int ScriptManager::isFreeCells(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4343,7 +4344,7 @@ int ScriptManager::getHumanFactionId(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4363,7 +4364,7 @@ int ScriptManager::highlightUnit(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4383,7 +4384,7 @@ int ScriptManager::unhighlightUnit(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4403,7 +4404,7 @@ int ScriptManager::giveStopCommand(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4423,7 +4424,7 @@ int ScriptManager::selectUnit(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4443,7 +4444,7 @@ int ScriptManager::unselectUnit(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4463,7 +4464,7 @@ int ScriptManager::addUnitToGroupSelection(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4483,7 +4484,7 @@ int ScriptManager::recallGroupSelection(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4503,7 +4504,7 @@ int ScriptManager::removeUnitFromGroupSelection(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4523,7 +4524,7 @@ int ScriptManager::setAttackWarningsEnabled(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4542,7 +4543,7 @@ int ScriptManager::getAttackWarningsEnabled(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4562,7 +4563,7 @@ int ScriptManager::getIsDayTime(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4581,7 +4582,7 @@ int ScriptManager::getIsNightTime(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4600,7 +4601,7 @@ int ScriptManager::getTimeOfDay(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4620,7 +4621,7 @@ int ScriptManager::registerDayNightEvent(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4639,7 +4640,7 @@ int ScriptManager::unregisterDayNightEvent(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4659,7 +4660,7 @@ int ScriptManager::registerUnitTriggerEvent(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4678,7 +4679,7 @@ int ScriptManager::unregisterUnitTriggerEvent(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4697,7 +4698,7 @@ int ScriptManager::getLastUnitTriggerEventUnitId(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4716,7 +4717,7 @@ int ScriptManager::getLastUnitTriggerEventType(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4737,7 +4738,7 @@ int ScriptManager::getUnitProperty(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4757,7 +4758,7 @@ int ScriptManager::getUnitPropertyName(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4777,7 +4778,7 @@ int ScriptManager::disableSpeedChange(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4796,7 +4797,7 @@ int ScriptManager::enableSpeedChange(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); @@ -4815,7 +4816,7 @@ int ScriptManager::getSpeedChangeEnabled(LuaHandle* luaHandle) { catch(const megaglest_runtime_error &ex) { char szErrBuf[8096]=""; snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - string sErrBuf = string(szErrBuf) + string("\nerror [") + string(ex.what()) + string("]\n"); + string sErrBuf = string(szErrBuf) + string("\nThe game may no longer be stable!\nerror [") + string(ex.what()) + string("]\n"); SystemFlags::OutputDebug(SystemFlags::debugError,sErrBuf.c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,sErrBuf.c_str()); diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 1f69a2dd..4df85195 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -3925,6 +3925,7 @@ int glestMain(int argc, char** argv) { if(hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_VERBOSE_MODE]) == true) { SystemFlags::VERBOSE_MODE_ENABLED = true; Thread::setEnableVerboseMode(true); + LuaScript::setDebugModeEnabled(true); } // DEbug testing threads //Thread::setEnableVerboseMode(true); diff --git a/source/glest_game/menu/menu_state_scenario.cpp b/source/glest_game/menu/menu_state_scenario.cpp index 2a6e8fd1..bf414ebd 100644 --- a/source/glest_game/menu/menu_state_scenario.cpp +++ b/source/glest_game/menu/menu_state_scenario.cpp @@ -313,15 +313,17 @@ void MenuStateScenario::update() { if(this->autoloadScenarioName != "") { string scenarioPath = Scenario::getScenarioPath(dirList, this->autoloadScenarioName); - //printf("[%s:%s] Line: %d this->autoloadScenarioName [%s] scenarioPath [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,this->autoloadScenarioName.c_str(),scenarioPath.c_str()); + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("[%s:%s] Line: %d this->autoloadScenarioName [%s] scenarioPath [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,this->autoloadScenarioName.c_str(),scenarioPath.c_str()); loadScenarioInfo(scenarioPath, &scenarioInfo ); - if(scenarioInfo.namei18n != "") { - this->autoloadScenarioName = scenarioInfo.namei18n; - } - else { - this->autoloadScenarioName = formatString(this->autoloadScenarioName); - } + //if(scenarioInfo.namei18n != "") { + // this->autoloadScenarioName = scenarioInfo.namei18n; + //} + //else { + this->autoloadScenarioName = formatString(this->autoloadScenarioName); + //} + + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("[%s:%s] Line: %d this->autoloadScenarioName [%s] scenarioPath [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,this->autoloadScenarioName.c_str(),scenarioPath.c_str()); listBoxScenario.setSelectedItem(this->autoloadScenarioName,false); diff --git a/source/shared_lib/include/lua/lua_script.h b/source/shared_lib/include/lua/lua_script.h index e0f38ab5..2855f555 100644 --- a/source/shared_lib/include/lua/lua_script.h +++ b/source/shared_lib/include/lua/lua_script.h @@ -47,6 +47,7 @@ private: string sandboxCode; static bool disableSandbox; + static bool debugModeEnabled; void DumpGlobals(); @@ -54,6 +55,7 @@ public: LuaScript(); ~LuaScript(); + static void setDebugModeEnabled(bool value) { debugModeEnabled = value; } static void setDisableSandbox(bool value) { disableSandbox = value; } void loadCode(string code, string name); diff --git a/source/shared_lib/sources/lua/lua_script.cpp b/source/shared_lib/sources/lua/lua_script.cpp index 3bc9c1e2..b03b8c88 100644 --- a/source/shared_lib/sources/lua/lua_script.cpp +++ b/source/shared_lib/sources/lua/lua_script.cpp @@ -46,6 +46,7 @@ public: // ===================================================== bool LuaScript::disableSandbox = false; +bool LuaScript::debugModeEnabled = false; LuaScript::LuaScript() { Lua_STREFLOP_Wrapper streflopWrapper; @@ -211,7 +212,7 @@ void LuaScript::DumpGlobals() void LuaScript::saveGame(XmlNode *rootNode) { std::map mapTagReplacements; - const bool debugLuaDump = false; + bool debugLuaDump = LuaScript::debugModeEnabled; //try{ LuaHandle *L = luaState; // push the first key (nil = beginning of table) @@ -257,6 +258,7 @@ void LuaScript::saveGame(XmlNode *rootNode) { // get the key as a string string key_string = lua_tostring(L, -2); // no copy required - we already know this is a string + if(debugLuaDump == true) printf("key_string [%s]\n",key_string.c_str()); // do not support variables that start with '_' // lua has some predefined values like _VERSION. They all start with underscore @@ -300,7 +302,7 @@ void LuaScript::saveGame(XmlNode *rootNode) { int tableKeyType = lua_type(L, -2); int tableValueType = lua_type(L, -1); - if(debugLuaDump == true) printf("LUA TABLE loop item type [%s]\n",lua_typename(L, tableValueType)); + if(debugLuaDump == true) printf("LUA TABLE loop item type [%s] key: %d value type: %d\n",lua_typename(L, tableValueType),tableKeyType,tableValueType); switch (tableValueType) { case LUA_TSTRING: @@ -321,7 +323,12 @@ void LuaScript::saveGame(XmlNode *rootNode) { if(debugLuaDump == true) printf("LUA TABLE loop C\n"); - value = lua_tostring (L, -1); + if(tableValueType == LUA_TBOOLEAN ) { + value = lua_toboolean(L, -1) == 0 ? "false" : "true"; + } + else { + value = lua_tostring (L, -1); + } if(debugLuaDump == true) printf("LUA TABLE loop D\n"); @@ -409,13 +416,21 @@ void LuaScript::saveGame(XmlNode *rootNode) { } void LuaScript::loadGame(const XmlNode *rootNode) { + bool debugLuaDump = LuaScript::debugModeEnabled; + if(debugLuaDump) printf("START [%s::%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); + vector luaScriptNodeList = rootNode->getChildList("LuaScript"); + + if(debugLuaDump) printf("luaScriptNodeList.size(): %d\n",(int)luaScriptNodeList.size()); + for(unsigned int i = 0; i < luaScriptNodeList.size(); ++i) { XmlNode *node = luaScriptNodeList[i]; string variable = node->getAttribute("variable")->getValue(); int value_type = node->getAttribute("value_type")->getIntValue(); + if(debugLuaDump) printf("i: %d [%s] [%d]\n",i,variable.c_str(),value_type); + switch (value_type) { case LUA_TSTRING: lua_pushstring( luaState, node->getAttribute("value")->getValue().c_str() ); @@ -430,6 +445,9 @@ void LuaScript::loadGame(const XmlNode *rootNode) { { lua_newtable(luaState); /* We will pass a table */ vector luaScriptTableNode = node->getChildList("Table"); + + if(debugLuaDump) printf("luaScriptTableNode.size(): %d\n",(int)luaScriptTableNode.size()); + for(unsigned int j = 0; j < luaScriptTableNode.size(); ++j) { XmlNode *nodeTable = luaScriptTableNode[j]; @@ -442,7 +460,7 @@ void LuaScript::loadGame(const XmlNode *rootNode) { lua_pushnumber( luaState, nodeTable->getAttribute("key")->getFloatValue() ); break; case LUA_TBOOLEAN: - lua_pushboolean( luaState, nodeTable->getAttribute("key")->getIntValue() ); + lua_pushboolean( luaState, nodeTable->getAttribute("key")->getBoolValue() ); break; } int value_type = nodeTable->getAttribute("value_type")->getIntValue(); @@ -454,7 +472,7 @@ void LuaScript::loadGame(const XmlNode *rootNode) { lua_pushnumber( luaState, nodeTable->getAttribute("value")->getFloatValue() ); break; case LUA_TBOOLEAN: - lua_pushboolean( luaState, nodeTable->getAttribute("value")->getIntValue() ); + lua_pushboolean( luaState, nodeTable->getAttribute("value")->getBoolValue() ); break; }