From 94619a7607ba6e1bb866499a740928b9b63b7243 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 20 Feb 2007 00:33:09 +0000 Subject: [PATCH] fix error handling --- stepmania/src/Actor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index cb3d1377d1..2605a8fc65 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -985,7 +985,9 @@ void Actor::RunCommands( const LuaReference& cmds, const LuaReference *pParamTab pParamTable->PushSelf( L ); // call function with 2 arguments and 0 results - lua_call( L, 2, 0 ); + RString sError; + if( !LuaHelpers::RunScriptOnStack(L, sError, 2, 0) ) + LOG->Warn( "Error playing command: %s", sError.c_str() ); LUA->Release(L); }