LuaInterface.LuaDLL.luaL_checktype C# (CSharp) Method

luaL_checktype() public static method

public static luaL_checktype ( IntPtr luaState, int p, LuaTypes t ) : void
luaState System.IntPtr
p int
t LuaTypes
return void
        public static void luaL_checktype(IntPtr luaState, int p, LuaTypes t)
        {
            LuaTypes ct = LuaDLL.lua_type(luaState, p);
            if (ct != t)
            {
                throw new Exception(string.Format("arg {0} expect {1}, got {2}", p, lua_typenamestr(luaState, t), lua_typenamestr(luaState, ct)));
            }
        }
LuaDLL