This commit is contained in:
Glenn Maynard
2006-10-09 05:43:24 +00:00
parent 206f731d79
commit d0ab27b056
+1 -14
View File
@@ -442,22 +442,9 @@ void LuaHelpers::PrepareExpression( RString &sInOut )
bool LuaHelpers::RunScriptFile( const RString &sFile )
{
RageFile f;
if( !f.Open( sFile ) )
{
RString sError = ssprintf( "Couldn't open Lua script \"%s\": %s", sFile.c_str(), f.GetError().c_str() );
Dialog::OK( sError, "LUA_ERROR" );
return false;
}
RString sScript;
if( f.Read( sScript ) == -1 )
{
RString sError = ssprintf( "Error reading Lua script \"%s\": %s", sFile.c_str(), f.GetError().c_str() );
Dialog::OK( sError, "LUA_ERROR" );
if( !GetFileContents(sFile, sScript) )
return false;
}
f.Close();
Lua *L = LUA->Get();