This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
If you're reporting a problem, please ALWAYS include the following information or I won't be able to help you! (Suggestions or feature requests need not use this template)
Thank you for understanding! It's not always easy to troubleshoot problems. Please don't make it more difficult by disregarding these suggestions.
Addon version - Latest r692-release
Restart - Not a new install
When I first login to the game I get this error. I have got it other times while looting but nothing I can reproduce. The only thing constant is when I first login the game I get this. I can't tell if this is an issue with Rarity or Draenor Treausres since it is also mentioned in the error:
Message: Interface\AddOns\Rarity\Core.lua:3940: attempt to index field 'Money' (a nil value)Time: Mon Oct 21 13:09:45 2019Count: 1Stack: Interface\AddOns\Rarity\Core.lua:3940: attempt to index field 'Money' (a nil value)[C]: ?Interface\AddOns\Rarity\Core.lua:3940: in function <Interface\AddOns\Rarity\Core.lua:3693>Interface\AddOns\Rarity\Core.lua:4074: in function `ShowTooltip'Interface\AddOns\Rarity\Core.lua:894: in function `func'..._DraenorTreasures\libs\AceTimer-3.0\AceTimer-3.0.lua:55: in function <..._DraenorTreasures\libs\AceTimer-3.0\AceTimer-3.0.lua:48>
Also reported under ticket # 356 ==>> https://www.curseforge.com/wow/addons/rarity/issues/356
I looked at Core.lua around lines 3940, which look like this:3938 if TSMAPI_FOUR then
3939 marketPrice = TSMAPI_FOUR.CustomPrice.GetItemPrice(v.itemId, 'DBMarket')
3940 marketPrice = TSMAPI_FOUR.Money.ToString(marketPrice)
3941 end
Firstly I tried to disable the option in Rarity called, "Show TSM Column", but it made no difference.
Then, I disabled TSM from loading, and that didn't cause Rarity to crash - so I think it's related to Rarity&TSM combination.
Then, since I have a lot of addons, I disabled all addons except TSM and Rarity - and I get the Lua error - so I think even more it's related to Rarity&TSM combination.
quartzfire
Indeed that is the like causing problems. After reviewing Rarity AND TSM4, it appears that recently they removed the TSMAPI_FOUR.Money.* functions. Whether by design, or accident, those API functions no longer exist, and have been merged to the non-public functions only. Here's the simple modification I made to TSM4 to get Rarity working again. There may be a better way to make Rarity work with the new TSM, but this was the quick fix to make TSM work with Rarity.
*** Core/Util/Money.lua 2019-10-22 14:47:14.892395266 -0500 --- Core/Util/Money.lua 2019-10-22 14:47:26.802197506 -0500 *************** *** 12,17 **** --- 12,18 ---- local _, TSM = ... TSM.Money = {} local Money = TSM.Money + TSMAPI_FOUR.Money = {} local private = { textMoneyParts = {} } local GOLD_ICON = "|TInterface\\MoneyFrame\\UI-GoldIcon:0|t" local SILVER_ICON = "|TInterface\\MoneyFrame\\UI-SilverIcon:0|t" *************** *** 144,149 **** --- 145,158 ---- return ((gold or 0) * COPPER_PER_GOLD) + ((silver or 0) * COPPER_PER_SILVER) + (copper or 0) end + function TSMAPI_FOUR.Money.ToString(value, color, ...) + return Money.ToString(value, color) + end + + function TSMAPI_FOUR.Money.FromString(value) + return Money.FromString(value) + end + -- ============================================================================ -- Helper Functions
The above fixed it for me, although it's worth mentioning that my Core/Util/Money.lua looked different.
I added TSMAPI_FOUR.Money = {} where indicated, just after local Money = TSM.Money, and then the bottom portion just above the "Helper Functions" area, but most of what is in between is different.
hi guys. pls tell me how use this fix where to go where to write idont know how and where write this fixes help me plz.
Confirmed, Nozz's fix fixed the unfixed fix.
I've come up with a couple of options, one TSM based, and one Rarity based (similar to Nozz's). As Rarity tends to update at a slower rate, I recommend Option 2, or just use Nozz's.
Another short-term TSM fix is now in TradeSkillMaster\LibTSM\Util\Money.lua, they update this addon fairly often.
This appears to work. Around line 15, or so, you should find
TSM.Money = Money
Add a new line just below it, so it looks like this...
TSM.Money = Money TSMAPI_FOUR.Money = Money
This doesn't work. I tried updating Rarity\Core.lua where
-- TSM Pricing local TSMAPI_FOUR = TSMAPI_FOUR
to
-- TSM Pricing local TSMAPI_FOUR = TSM
but because TSM still declares TSM as local, Rarity cannot access it. But elsewhere in TSM, TSMAPI_FOUR is not local, so that works.
Another possible Rarity only fix is similar to Nozz's fix. It ensures that not only does TSM export TSMAPI_FOUR, but also declares TSMAPI_FOUR.Money,
this maintains existing Rarity functionality, instead of potentially adding a new purpose to an existing setting (called overloading in programming terms).
Around line 3938, change
if TSMAPI_FOUR then
if TSMAPI_FOUR and TSMAPI_FOUR.Money then
Nozzzztraaa
That fix seems to work for me so far! Thank you
Sorry for the delay. I'm looking into it and will try to find a way to make the feature work again.
No ETA, but it might be a few days, as I just returned and have to catch up on lots of issues that have piled up in my absence.
Status: https://github.com/SacredDuckwhale/Rarity/issues/139
Uenu tymv for your help!
A fix has been added to the latest alpha version. Feel free to report back if there are any other issues! :)
To post a comment, please login or register a new account.