BelegCufea / PrettyReputation

Simple addon to modify reputation gain messages
https://www.curseforge.com/wow/addons/pretty-reputation
GNU General Public License v3.0
4 stars 0 forks source link

Lua error on login (latest master branch) #7

Closed filliph closed 1 year ago

filliph commented 1 year ago
14x PrettyReputation/core.lua:532: attempt to index field 'paragon' (a nil value)
[string "@PrettyReputation/core.lua"]:532: in function <PrettyReputation/core.lua:529>
BelegCufea commented 1 year ago

Thanks again.

Will look into it. Still working on hiding reward bag from on-screen bars :-)

BelegCufea commented 1 year ago

Pushed a commit into master to apply dirty fix for the error (so you can use latest code).

I don't know if there are more errors as I need to test it once I gain new paragon level on one of my chars (hope it will be soon).

Sorry for inconvenience.

filliph commented 1 year ago

New issue when turning in quests in the Forbidden Reach:

9x PrettyReputation/core.lua:540: attempt to call local 'event' (a string value)
[string "@PrettyReputation/core.lua"]:540: in function `UpdateReward'
[string "@PrettyReputation/core.lua"]:433: in function `UpdateBars'
[string "@PrettyReputation/core.lua"]:513: in function <PrettyReputation/core.lua:509>
filliph commented 1 year ago

Ahh, it's a string concatenation issue 😄 Debug:Info(v.info.reward, event ": " ..v.info.name) is missing the .. 😄

filliph commented 1 year ago

There's also a typo, if v.info.poragon then should be if v.info.paragon then

filliph commented 1 year ago

local _, _, _, hasRewardPending = C_Reputation.GetFactionParagonInfo(v.info.factionID) might need to be local _, _, _, hasRewardPending = C_Reputation.GetFactionParagonInfo(v.info.factionId) since I think Lua table keys are case sensitive - this caused another error

9x PrettyReputation/core.lua:541: Usage: local currentValue, threshold, rewardQuestID, hasRewardPending, tooLowLevelForParagon = C_Reputation.GetFactionParagonInfo(factionID)
[string "=[C]"]: in function `GetFactionParagonInfo'
[string "@PrettyReputation/core.lua"]:541: in function <PrettyReputation/core.lua:533>
BelegCufea commented 1 year ago

Ahh, tyvm. That part of code triggers when reward for paragon is ready. Was not eligable for this from the time I wrote that code.

Will implement your fixes right away.

BelegCufea commented 1 year ago

I just released version 1.3.0-beta2.

It has been somewhat tested (though you know how my tests go).

If you are okay with it and don't find any more errors, I will close this issue.

filliph commented 1 year ago

Looks good to me, no errors on load or when gaining rep (both Paragon and "normal") 😄

BelegCufea commented 1 year ago

OK. Thanks again.