bring RunExpression and RunScript closer together
This commit is contained in:
@@ -301,7 +301,7 @@ bool LuaManager::RunScript( const CString &sScript, int iReturnValues )
|
||||
}
|
||||
|
||||
|
||||
bool LuaManager::RunExpression( const CString &str )
|
||||
bool LuaManager::RunExpression( const CString &str, int iReturnValues )
|
||||
{
|
||||
// load string
|
||||
{
|
||||
@@ -324,7 +324,7 @@ bool LuaManager::RunExpression( const CString &str )
|
||||
|
||||
// evaluate
|
||||
{
|
||||
int ret = lua_pcall(L, 0, 1, 0);
|
||||
int ret = lua_pcall( L, 0, iReturnValues, 0 );
|
||||
if( ret )
|
||||
{
|
||||
CString err;
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
static void ReadArrayFromTable( vector<bool> &aOut, lua_State *L = NULL );
|
||||
|
||||
/* Run an expression. The result is left on the Lua stack. */
|
||||
bool RunExpression( const CString &str );
|
||||
bool RunExpression( const CString &str, int iReturnValues = 1 );
|
||||
lua_State *L;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user