From a763dd0a26f3c9501981d45ce48ad7d7bad94299 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Mon, 13 Nov 2023 04:51:20 -0300 Subject: [PATCH] fix: table.remove function does not work with random indexes (#1801) --- data/libs/functions/game.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/libs/functions/game.lua b/data/libs/functions/game.lua index 4be079586d2..5682f5c5869 100644 --- a/data/libs/functions/game.lua +++ b/data/libs/functions/game.lua @@ -138,7 +138,7 @@ function Game.setStorageValue(key, value) if value == -1 then if globalStorageTable[key] then - table.remove(globalStorageTable, key) + globalStorageTable[key] = nil end return end