Skip to content

Commit

Permalink
fix: resolve nil index issue in destroy script callback (opentibiabr#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
omarcopires authored Nov 14, 2024
1 parent 6b48370 commit 4ee11d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data-canary/scripts/actions/other/destroy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ee11d6

Please sign in to comment.