Fix incorrect formatting

Gets rid of this warning:

  error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
This commit is contained in:
Martin Natano
2022-06-05 12:04:37 +02:00
parent 228920e7dc
commit 699ef6fdbe
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -738,7 +738,7 @@ void GameCommand::ApplySelf( const vector<PlayerNumber> &vpns ) const
}
break;
default:
LuaHelpers::ReportScriptError("Invalid StyleType: " + m_pStyle->m_StyleType);
LuaHelpers::ReportScriptErrorFmt("Invalid StyleType: %d", m_pStyle->m_StyleType);
}
}
if( m_dc != Difficulty_Invalid )
+2 -3
View File
@@ -183,9 +183,8 @@ void MenuTimer::SetText( float fSeconds )
LuaHelpers::Push( L, fSeconds );
// call function with 1 argument and 1 result
RString Error= "Error running Text" + (i+1);
Error+= "FormatFunction: ";
LuaHelpers::RunScriptOnStack(L, Error, 1, 1, true);
RString errorMessage = ssprintf("Error running Text%dFormatFunction: ", i+1);
LuaHelpers::RunScriptOnStack(L, errorMessage, 1, 1, true);
RString sText;
LuaHelpers::Pop( L, sText );