public static lua_isboolean ( |
||
luaState | ||
index | int | |
Résultat | bool |
public static bool lua_isboolean(IntPtr luaState, int index)
{
return LuaDLL.lua_type(luaState, index) == LuaTypes.LUA_TBOOLEAN;
}
[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)]
public static bool luaL_checkboolean(IntPtr luaState, int index) { if (LuaDLL.lua_isboolean(luaState, index)) { return(LuaDLL.lua_toboolean(luaState, index)); } LuaDLL.luaL_typerror(luaState, index, "boolean", null); return(false); }