- bugfix for lua strings

This commit is contained in:
Mark Vejvoda 2012-03-30 01:48:41 +00:00
parent 435e06db20
commit f7423608ce
2 changed files with 6 additions and 6 deletions

View File

@ -680,7 +680,6 @@ void ScriptManager::addConsoleLangText(const char *fmt, ...){
char szBuf[max_debug_buffer_size]="";
vsnprintf(szBuf,max_debug_buffer_size-1,fmt, argList);
//displayText= wrapString(Lang::getInstance().getScenarioString(text), displayTextWrapCount);
world->addConsoleTextWoLang(szBuf);
va_end(argList);
@ -698,7 +697,6 @@ void ScriptManager::DisplayFormattedText(const char *fmt, ...) {
char szBuf[max_debug_buffer_size]="";
vsnprintf(szBuf,max_debug_buffer_size-1,fmt, argList);
//displayText= wrapString(Lang::getInstance().getScenarioString(text), displayTextWrapCount);
displayText=szBuf;
va_end(argList);
@ -716,7 +714,6 @@ void ScriptManager::DisplayFormattedLangText(const char *fmt, ...) {
char szBuf[max_debug_buffer_size]="";
vsnprintf(szBuf,max_debug_buffer_size-1,fmt, argList);
//displayText= wrapString(Lang::getInstance().getScenarioString(text), displayTextWrapCount);
displayText=szBuf;
va_end(argList);
@ -2062,6 +2059,9 @@ void ScriptManager::saveGame(XmlNode *rootNode) {
for(std::list<ScriptManagerMessage>::iterator it = messageQueue.begin(); it != messageQueue.end(); ++it) {
(*it).saveGame(scriptManagerNode);
}
//printf("==== ScriptManager Savegame messageBox [%d][%s][%s] displayText [%s]\n",messageBox.getEnabled(),messageBox.getText().c_str(),messageBox.getHeader().c_str(),displayText.c_str());
// GraphicMessageBox messageBox;
scriptManagerNode->addAttribute("messageBox_enabled",intToStr(messageBox.getEnabled()), mapTagReplacements);
scriptManagerNode->addAttribute("messageBox_text",messageBox.getText(), mapTagReplacements);

View File

@ -283,9 +283,9 @@ void LuaScript::saveGame(XmlNode *rootNode) {
}
// enclose the value in "" if it is a string
if (value_type == LUA_TSTRING) {
value_string = "\"" + value_string + "\"";
}
//if (value_type == LUA_TSTRING) {
//value_string = "\"" + value_string + "\"";
//}
if(skipTable == true) {
if(debugLuaDump == true) printf("#2 SKIPPING TABLE\n");