From e38164e74f066e2281ba525fedc2cf6bf94e8d5c Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 12 Feb 2005 22:53:51 +0000 Subject: [PATCH] yell louder on error when parsing scripts --- stepmania/src/LuaManager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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