use LuaHelpers::RunExpression

This commit is contained in:
Glenn Maynard
2006-09-22 19:45:37 +00:00
parent 40eef3c600
commit 3130411629
+3 -7
View File
@@ -127,15 +127,11 @@ void LuaReference::Unregister()
bool LuaReference::SetFromExpression( const RString &sExpression )
{
RString sFullExpression = "return " + sExpression;
Lua *L = LUA->Get();
bool bSuccess = LuaHelpers::RunScript(L, sFullExpression, "", 1);
if( !bSuccess )
this->SetFromNil();
else
this->SetFromStack( L );
bool bSuccess = LuaHelpers::RunExpression( L, sExpression );
this->SetFromStack( L );
LUA->Release( L );
return bSuccess;
}