WQAchievements

WQAchievements

250k Downloads

Lua error with TWW prepatch

KatyPurry opened this issue · 3 comments

commented

Hello, I have a lua error with TWW prepatch (addon version 10.2.7-1)

Message: Interface/AddOns/WQAchievements/WQAchievements.lua:1557: attempt to call global 'GetNumQuestLogRewardCurrencies' (a nil value)
Time: Wed Jul 24 09:27:34 2024
Count: 1
Stack: Interface/AddOns/WQAchievements/WQAchievements.lua:1557: attempt to call global 'GetNumQuestLogRewardCurrencies' (a nil value)
[string "@Interface/AddOns/WQAchievements/WQAchievements.lua"]:1557: in function `CheckCurrencies'
[string "@Interface/AddOns/WQAchievements/WQAchievements.lua"]:1039: in function `Reward'
[string "@Interface/AddOns/WQAchievements/WQAchievements.lua"]:284: in function `CreateQuestList'
[string "@Interface/AddOns/WQAchievements/WQAchievements.lua"]:528: in function `?'
[string "@Interface/AddOns/ElvUI_Libraries/Core/Ace3/AceTimer-3.0/AceTimer-3.0.lua"]:55: in function <...UI_Libraries/Core/Ace3/AceTimer-3.0/AceTimer-3.0.lua:50>

Locals: self = <table> {
 modules = <table> {
 }
 debug = false
 questPinMapList = <table> {
 }
 itemList = <table> {
 }
 ExpansionList = <table> {
 }
 missionList = <table> {
 }
 data = <table> {
 }
 EmissaryQuestIDList = <table> {
 }
 db = <table> {
 }
 rewards = false
 Achievements = <table> {
 }
 questPinList = <table> {
 }
 optionsFrame = Frame {
 }
 first = false
 name = "WQAchievements"
 L = <table> {
 }
 baseName = "WQAchievements"
 defaultModuleState = true
 questList = <table> {
 }
 ZoneIDList = <table> {
 }
 playerName = "Zazõu-Hyjal"
 faction = "Horde"
 defaultModuleLibraries = <table> {
 }
 event = Frame {
 }
 orderedModules = <table> {
 }
 watched = <table> {
 }
 watchedMissions = <table> {
 }
 enabledState = true
 links = <table> {
 }
 Criterias = <table> {
 }
 questFlagList = <table> {
 }
}
questID = 54800
isEmissary = nil
(*temporary) = nil
(*temporary) = 54800
(*temporary) = "attempt to call global 'GetNumQuestLogRewardCurrencies' (a nil value)"
ReputationCurrencyList = <table> {
 1595 = 2156
 1599 = 2159
 1738 = 2373
 1592 = 2161
 1596 = 2158
 1600 = 2157
 1739 = 2400
 1593 = 2160
 1597 = 2103
 1742 = 2391
 1579 = 2164
 1598 = 2163
 1594 = 2162
}
Message: Interface/AddOns/WQAchievements/WQAchievements.lua:1557: attempt to call global 'GetNumQuestLogRewardCurrencies' (a nil value)
Time: Wed Jul 24 09:32:25 2024
Count: 1
Stack: Interface/AddOns/WQAchievements/WQAchievements.lua:1557: attempt to call global 'GetNumQuestLogRewardCurrencies' (a nil value)
[string "@Interface/AddOns/WQAchievements/WQAchievements.lua"]:1557: in function `CheckCurrencies'
[string "@Interface/AddOns/WQAchievements/WQAchievements.lua"]:1039: in function `Reward'
[string "@Interface/AddOns/WQAchievements/WQAchievements.lua"]:284: in function `CreateQuestList'
[string "@Interface/AddOns/WQAchievements/WQAchievements.lua"]:528: in function `Show'
[string "@Interface/AddOns/WQAchievements/WQAchievements.lua"]:207: in function `func'
[string "@Interface/AddOns/ElvUI_Libraries/Core/Ace3/AceTimer-3.0/AceTimer-3.0.lua"]:57: in function <...UI_Libraries/Core/Ace3/AceTimer-3.0/AceTimer-3.0.lua:50>

Locals: self = <table> {
 modules = <table> {
 }
 debug = false
 questPinMapList = <table> {
 }
 itemList = <table> {
 }
 ExpansionList = <table> {
 }
 missionList = <table> {
 }
 data = <table> {
 }
 EmissaryQuestIDList = <table> {
 }
 db = <table> {
 }
 rewards = false
 Achievements = <table> {
 }
 questPinList = <table> {
 }
 optionsFrame = Frame {
 }
 first = false
 name = "WQAchievements"
 L = <table> {
 }
 baseName = "WQAchievements"
 defaultModuleState = true
 questList = <table> {
 }
 ZoneIDList = <table> {
 }
 playerName = "Zazõu-Hyjal"
 faction = "Horde"
 defaultModuleLibraries = <table> {
 }
 event = Frame {
 }
 orderedModules = <table> {
 }
 watched = <table> {
 }
 watchedMissions = <table> {
 }
 enabledState = true
 links = <table> {
 }
 Criterias = <table> {
 }
 questFlagList = <table> {
 }
}
questID = 54800
isEmissary = nil
(*temporary) = nil
(*temporary) = 54800
(*temporary) = "attempt to call global 'GetNumQuestLogRewardCurrencies' (a nil value)"
ReputationCurrencyList = <table> {
 1595 = 2156
 1599 = 2159
 1738 = 2373
 1592 = 2161
 1596 = 2158
 1600 = 2157
 1739 = 2400
 1593 = 2160
 1597 = 2103
 1742 = 2391
 1579 = 2164
 1598 = 2163
 1594 = 2162
}
commented

Getting the same errors.

commented

for some reason my errors where in lines 1828-1830

I fixed with replacing
local numQuestCurrencies = GetNumQuestLogRewardCurrencies(questID) for i = 1, numQuestCurrencies do local name, texture, numItems, currencyID = GetQuestLogRewardCurrencyInfo(i, questID)
with
local uniqueCurrencyIDs = { } local currencyRewards = C_QuestLog.GetQuestRewardCurrencies(questID) for index, currencyReward in ipairs(currencyRewards) do local rarity = C_CurrencyInfo.GetCurrencyInfo(currencyReward.currencyID).quality; local firstInstance = not uniqueCurrencyIDs[currencyReward.currencyID];
(apparently I was on an old version that still worked)

Submitted pull request

commented

Fixed. Thanks for letting me know.