From 33c84aaa4d9d5d5255439948d318a1894db4cba4 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Tue, 11 Feb 2014 15:03:35 +0100 Subject: Added cLuaState::CheckParamFunctionOrNil(). Also fixed error reporting for the two function-checking functions. --- src/Bindings/LuaState.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Bindings/LuaState.h') diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index 1c9c99e69..b9bf10142 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -833,6 +833,9 @@ public: /** Returns true if the specified parameters on the stack are functions; also logs warning if not */ bool CheckParamFunction(int a_StartParam, int a_EndParam = -1); + /** Returns true if the specified parameters on the stack are functions or nils; also logs warning if not */ + bool CheckParamFunctionOrNil(int a_StartParam, int a_EndParam = -1); + /** Returns true if the specified parameter on the stack is nil (indicating an end-of-parameters) */ bool CheckParamEnd(int a_Param); -- cgit v1.2.3