diff --git a/stepmania/src/LuaManager.cpp b/stepmania/src/LuaManager.cpp index e1d9af2754..c7d7b20065 100644 --- a/stepmania/src/LuaManager.cpp +++ b/stepmania/src/LuaManager.cpp @@ -230,14 +230,16 @@ bool LuaManager::RunScriptFile( const CString &sFile ) RageFile f; if( !f.Open( sFile ) ) { - LOG->Warn( "Couldn't open Lua script \"%s\": %s", sFile.c_str(), f.GetError().c_str() ); + CString sError = ssprintf( "Couldn't open Lua script \"%s\": %s", sFile.c_str(), f.GetError().c_str() ); + Dialog::OK( sError, "LUA_ERROR" ); return false; } CString sScript; if( f.Read( sScript ) == -1 ) { - LOG->Warn( "Error reading Lua script \"%s\": %s", sFile.c_str(), f.GetError().c_str() ); + CString sError = ssprintf( "Error reading Lua script \"%s\": %s", sFile.c_str(), f.GetError().c_str() ); + Dialog::OK( sError, "LUA_ERROR" ); return false; } @@ -280,6 +282,7 @@ bool LuaManager::RunScript( const CString &sScript, int iReturnValues ) return true; } + bool LuaManager::RunExpression( const CString &str ) { // load string