public static int FindLevel(IntPtr l) { int result; try { int total = LuaDLL.lua_gettop(l); if (LuaObject.matchType(l, total, 2, typeof(RiftChapter), typeof(int))) { DataSectionRift dataSectionRift = (DataSectionRift)LuaObject.checkSelf(l); RiftChapter chapter; LuaObject.checkType <RiftChapter>(l, 2, out chapter); int levelId; LuaObject.checkType(l, 3, out levelId); RiftLevel o = dataSectionRift.FindLevel(chapter, levelId); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } else if (LuaObject.matchType(l, total, 2, typeof(int), typeof(int))) { DataSectionRift dataSectionRift2 = (DataSectionRift)LuaObject.checkSelf(l); int chapterId; LuaObject.checkType(l, 2, out chapterId); int levelId2; LuaObject.checkType(l, 3, out levelId2); RiftLevel o2 = dataSectionRift2.FindLevel(chapterId, levelId2); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o2); result = 2; } else { LuaObject.pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function FindLevel to call"); result = 2; } } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }