Skip to content

Commit

Permalink
Fix nil index in on_damage callback
Browse files Browse the repository at this point in the history
  • Loading branch information
stujones11 committed May 3, 2017
1 parent 4773496 commit 793c748
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 3d_armor/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ end
armor.damage = function(self, player, index, stack, use)
local old_stack = ItemStack(stack)
stack:add_wear(use)
self:run_callbacks("on_damage", player, i, stack)
self:run_callbacks("on_damage", player, index, stack)
self:set_inventory_stack(player, index, stack)
if stack:get_count() == 0 then
self:run_callbacks("on_unequip", player, index, old_stack)
Expand Down

0 comments on commit 793c748

Please sign in to comment.