From 4ee11d6420f4070a10cae298a1e3c1439a788b75 Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 14 Nov 2024 13:31:13 -0300 Subject: [PATCH] fix: resolve nil index issue in destroy script callback (#3117) Fixed an error in the item destruction script where calling `ActionsLib.destroyItem` resulted in a `nil` reference. The function call was adjusted to use `destroyItem` directly, ensuring the script works correctly and avoids global index errors. --- data-canary/scripts/actions/other/destroy.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-canary/scripts/actions/other/destroy.lua b/data-canary/scripts/actions/other/destroy.lua index 587df2f5ea7..62af94ab101 100644 --- a/data-canary/scripts/actions/other/destroy.lua +++ b/data-canary/scripts/actions/other/destroy.lua @@ -250,7 +250,7 @@ local setting = { local destroy = Action() function destroy.onUse(player, item, fromPosition, target, toPosition, isHotkey) - return ActionsLib.destroyItem(player, target, toPosition) + return destroyItem(player, target, toPosition) end for index, value in ipairs(setting) do