Console throws this error everytime a player gets a reward
Lua Script Error: [Action Interface]
data/actions/scripts/rewardchest.luanUse
data/actions/scripts/rewardchest.lua:2: attempt to call method 'updateRewardChest' (a nil value)
stack traceback:
[C]: in function 'updateRewardChest'
data/actions/scripts/rewardchest.lua:2: in function <data/actions/scripts/rewardchest.lua:1>
This is the rewardchest.lua
Where and which function I should add?
Lua Script Error: [Action Interface]
data/actions/scripts/rewardchest.luanUse
data/actions/scripts/rewardchest.lua:2: attempt to call method 'updateRewardChest' (a nil value)
stack traceback:
[C]: in function 'updateRewardChest'
data/actions/scripts/rewardchest.lua:2: in function <data/actions/scripts/rewardchest.lua:1>
This is the rewardchest.lua
Lua:
function onUse(player, item)
player:updateRewardChest()
return false
end
Where and which function I should add?