diff --git a/GlobalMethods.h b/GlobalMethods.h index a495923..7e2f1fb 100644 --- a/GlobalMethods.h +++ b/GlobalMethods.h @@ -482,8 +482,8 @@ namespace LuaGlobalFunctions { uint32 entry = Eluna::CHECKVAL(L, 1); uint32 ev = Eluna::CHECKVAL(L, 2); - luaL_checktype(L, 2, LUA_TFUNCTION); - lua_pushvalue(L, 2); + luaL_checktype(L, 3, LUA_TFUNCTION); + lua_pushvalue(L, 3); int functionRef = luaL_ref(L, LUA_REGISTRYINDEX); if (functionRef > 0) sEluna->Register(HookMgr::REGTYPE_PACKET, entry, ev, functionRef);