use LuaHelpers::RunExpression
This commit is contained in:
@@ -127,15 +127,11 @@ void LuaReference::Unregister()
|
|||||||
|
|
||||||
bool LuaReference::SetFromExpression( const RString &sExpression )
|
bool LuaReference::SetFromExpression( const RString &sExpression )
|
||||||
{
|
{
|
||||||
RString sFullExpression = "return " + sExpression;
|
|
||||||
|
|
||||||
Lua *L = LUA->Get();
|
Lua *L = LUA->Get();
|
||||||
|
|
||||||
bool bSuccess = LuaHelpers::RunScript(L, sFullExpression, "", 1);
|
bool bSuccess = LuaHelpers::RunExpression( L, sExpression );
|
||||||
if( !bSuccess )
|
this->SetFromStack( L );
|
||||||
this->SetFromNil();
|
|
||||||
else
|
|
||||||
this->SetFromStack( L );
|
|
||||||
LUA->Release( L );
|
LUA->Release( L );
|
||||||
return bSuccess;
|
return bSuccess;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user