Hi all,
You might run into a bug with TSM_Mailing when buying items off the AH, something like
Code:
bad argument #3 to 'format' (number expected, got nil)
This is due to line 255 in
Code:
Interface/Addons/TradeSkillMaster_Mailing/Modules/Inbox.lua
which looks like
Code:
local _, _, sender, subject, money, codAmount, daysLeft, hasItem, _, _, _, _, _, itemQuantity = GetInboxHeaderInfo(i)
According to the GetInboxHeaderInfo API, `itemQuantity` isn't a returned value, instead it's `hasItem`.
The fix is to change line 255 and 261 in that same file. Originally, line 255 looks like
Code:
local _, _, sender, subject, money, codAmount, daysLeft, hasItem, _, _, _, _, _, itemQuantity = GetInboxHeaderInfo(i)
Change this to
Code:
local _, _, sender, subject, money, codAmount, daysLeft, hasItem, _, _, _, _, _ = GetInboxHeaderInfo(i)
And change line 261. Originally it looks like
Code:
mailInfo[i] = format(L["Buy: %s (%d) | %s | %s"], itemLink, itemQuantity, TSMAPI:FormatTextMoney(bid, redColor), FormatDaysLeft(daysLeft, i))
Change this to
Code:
mailInfo[i] = format(L["Buy: %s (%d) | %s | %s"], itemLink, hasItem, TSMAPI:FormatTextMoney(bid, redColor), FormatDaysLeft(daysLeft, i))
@BlueAo kind suggestion to update the script and re-upload TSM to help everyone else avoid this? Or otherwise maybe it might just be my client that's breaking it somehow? Anyway, thanks for the hard work!