From 41e4e7c2f84b5e319f9a7bbd7fde9830b3592d6b Mon Sep 17 00:00:00 2001 From: Aspect <41125780+Aspect12@users.noreply.github.com> Date: Wed, 11 Sep 2024 19:13:38 +0300 Subject: [PATCH 1/2] Fix class kick stack overflow error. --- gamemode/core/libs/sh_class.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gamemode/core/libs/sh_class.lua b/gamemode/core/libs/sh_class.lua index 93c5ea4c2..ea078beaa 100644 --- a/gamemode/core/libs/sh_class.lua +++ b/gamemode/core/libs/sh_class.lua @@ -178,6 +178,12 @@ if (SERVER) then end end + if (!goClass) then + ErrorNoHaltWithStack("[Helix] No default class set for faction '" .. team.GetName(client:Team()) .. "'") + + return + end + self:JoinClass(goClass) hook.Run("PlayerJoinedClass", client, goClass) From f980b7b6b560eeab232b415208eac9efbc454f1e Mon Sep 17 00:00:00 2001 From: Aspect <41125780+Aspect12@users.noreply.github.com> Date: Wed, 11 Sep 2024 22:04:15 +0300 Subject: [PATCH 2/2] Add ErrorNoHaltWithStack to .luacheckrc. --- .luacheckrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.luacheckrc b/.luacheckrc index 5026357a8..25536243a 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -3313,6 +3313,7 @@ stds.gmod.read_globals = { "SOLID_BBOX", "CHAN_WEAPON", "ErrorNoHalt", + "ErrorNoHaltWithStack", "ACT_HL2MP_RUN_DUEL", "ACT_DOD_WALK_ZOOM_BAZOOKA", "type",