From bac379118ded65ab53aac0a5141537bde2d47047 Mon Sep 17 00:00:00 2001 From: Selt <83926739+seltonmt012@users.noreply.github.com> Date: Tue, 28 Jul 2026 00:53:00 +0200 Subject: [PATCH] fix(esx_lib): match uint against integer and drop the unread interaction list math.type only returns 'integer', 'float' or nil, so the 'uint' branch comparing against 'int' never matched and threw whenever throw_error was set. pressedInteractions was written on every interaction and read nowhere, so it grew for the whole session and kept removed interactions reachable. --- [core]/esx_lib/imports/interactions/client.lua | 2 -- [core]/esx_lib/imports/verify/shared.lua | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/[core]/esx_lib/imports/interactions/client.lua b/[core]/esx_lib/imports/interactions/client.lua index 01b88c09..a620b2ef 100644 --- a/[core]/esx_lib/imports/interactions/client.lua +++ b/[core]/esx_lib/imports/interactions/client.lua @@ -2,7 +2,6 @@ xLib.interactions = {} local interactions = {} -local pressedInteractions = {} ---@param name string function xLib.interactions.remove(name) @@ -36,7 +35,6 @@ xLib.addKeybind({ for _, interaction in pairs(interactions) do local success, result = pcall(interaction.condition) if success and result then - pressedInteractions[#pressedInteractions + 1] = interaction interaction.onPress() end end diff --git a/[core]/esx_lib/imports/verify/shared.lua b/[core]/esx_lib/imports/verify/shared.lua index 8de48d22..5698b56f 100644 --- a/[core]/esx_lib/imports/verify/shared.lua +++ b/[core]/esx_lib/imports/verify/shared.lua @@ -81,7 +81,7 @@ local function verifyType(value, valid_type) elseif valid_type == 'float' then return math.type(value) == 'float' elseif valid_type == 'uint' then - return math.type(value) == 'int' and value >= 0 + return math.type(value) == 'integer' and value >= 0 elseif valid_type == 'char' then return type(value) == 'string' and #value == 1 elseif valid_type == 'ped' then