Storyline

Storyline

1M Downloads

Error when decorating a reward with empty reward

Ellypse opened this issue ยท 0 comments

commented

This Lua error seems to appear when trying to decorate a reward button but the reward passed to the function is nil. We might want to check that we have a correct reward before trying to decorate a button for it.

Message: ...terface\AddOns\Storyline\rewards\rewards_buttons.lua:130: attempt to index local 'reward' (a nil value)
Time: 03/14/18 18:38:10
Count: 1
Stack: ...terface\AddOns\Storyline\rewards\rewards_buttons.lua:130: attempt to index local 'reward' (a nil value)
...terface\AddOns\Storyline\rewards\rewards_buttons.lua:130: in function <...terface\AddOns\Storyline\rewards\rewards_buttons.lua:118>
...terface\AddOns\Storyline\rewards\rewards_buttons.lua:173: in function `Refresh'
...terface\AddOns\Storyline\rewards\rewards_buttons.lua:325: in function `callback'
Interface\AddOns\Storyline\lib\lib.lua:146: in function <Interface\AddOns\Storyline\lib\lib.lua:142>

Locals: button = Storyline_RewardButton2 {
0 = <userdata>
isLargeButton = false
NameFrame = Storyline_RewardButton2NameFrame {
}
Refresh = <function> defined @Interface\AddOns\Storyline\rewards\rewards_buttons.lua:170
rewardBucketType = 1
rewardType = 2
Count = Storyline_RewardButton2Count {
}
rewardIndex = 1
isAvailable = false
hasItem = false
Icon = Storyline_RewardButton2IconTexture {
}
Name = Storyline_RewardButton2Name {
}
}
rewardType = 2
reward = nil
(*temporary) = <function> defined @Interface\AddOns\Storyline\rewards\rewards_buttons.lua:72
(*temporary) = Storyline_RewardButton2 {
0 = <userdata>
isLargeButton = false
NameFrame = Storyline_RewardButton2NameFrame {
}
Refresh = <function> defined @Interface\AddOns\Storyline\rewards\rewards_buttons.lua:170
rewardBucketType = 1
rewardType = 2
Count = Storyline_RewardButton2Count {
}
rewardIndex = 1
isAvailable = false
hasItem = false
Icon = Storyline_RewardButton2IconTexture {
}
Name = Storyline_RewardButton2Name {
}
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index local 'reward' (a nil value)"
Rewards = <table> {
buttons = <table> {
}
REWARD_TYPES = <table> {
}
getObjectiveItems = <function> defined @Interface\AddOns\Storyline\rewards\rewards.lua:353
getRewards = <function> defined @Interface\AddOns\Storyline\rewards\rewards.lua:268
BUCKET_TYPES = <table> {
}
getRewardsForBucketTypeAndRewardType = <function> defined @Interface\AddOns\Storyline\rewards\rewards.lua:262
}
decorateCurrencyButton = <function> defined @Interface\AddOns\Storyline\rewards\rewards_buttons.lua:59
decorateSpellButton = <function> defined @Interface\AddOns\Storyline\rewards\rewards_buttons.lua:100
decorateItemButton = <function> defined @Interface\AddOns\Storyline\rewards\rewards_buttons.lua:36
decorateFollowerButton = <function> defined @Interface\AddOns\Storyline\rewards\rewards_buttons.lua:106
decorateSkillPointButton = <function> defined @Interface\AddOns\Storyline\rewards\rewards_buttons.lua:89
decorateStandardButton = <function> defined @Interface\AddOns\Storyline\rewards\rewards_buttons.lua:72