BagSync

BagSync

3M Downloads

Bug report: Enter the game and report an error after updating to 16.2

zhouksheng11 opened this issue · 4 comments

commented

58x ...BagSync\libs\LibItemSearch-1.2\LibItemSearch-1.2-15.lua:230: attempt to call field 'GetAzeriteCurrencyID' (a nil value)
[string "@BagSync\libs\LibItemSearch-1.2\LibItemSearch-1.2-15.lua"]:230: in main chunk

Locals:
Search =

{
OR = "或者"
NOT_MATCH = "否"
NOT = "否"
Find = defined @ElvUI\Libraries\Core\LibItemSearch-1.2\CustomSearch-1.0\CustomSearch-1.0.lua:133
Match = defined @ElvUI\Libraries\Core\LibItemSearch-1.2\CustomSearch-1.0\CustomSearch-1.0.lua:56
MatchAny = defined @ElvUI\Libraries\Core\LibItemSearch-1.2\CustomSearch-1.0\CustomSearch-1.0.lua:48
ACCENTS =
{
}
MatchAll = defined @ElvUI\Libraries\Core\LibItemSearch-1.2\CustomSearch-1.0\CustomSearch-1.0.lua:38
UseFilter = defined @ElvUI\Libraries\Core\LibItemSearch-1.2\CustomSearch-1.0\CustomSearch-1.0.lua:123
Compare = defined @ElvUI\Libraries\Core\LibItemSearch-1.2\CustomSearch-1.0\CustomSearch-1.0.lua:153
Matches = defined @ElvUI\Libraries\Core\LibItemSearch-1.2\CustomSearch-1.0\CustomSearch-1.0.lua:29
Filter = defined @ElvUI\Libraries\Core\LibItemSearch-1.2\CustomSearch-1.0\CustomSearch-1.0.lua:101
Clean = defined @ElvUI\Libraries\Core\LibItemSearch-1.2\CustomSearch-1.0\CustomSearch-1.0.lua:142
}
Unfit =
{
IsItemUnusable = defined @ElvUI\Libraries\Core\LibItemSearch-1.2\Unfit-1.0\Unfit-1.0.lua:113
IsClassUnusable = defined @ElvUI\Libraries\Core\LibItemSearch-1.2\Unfit-1.0\Unfit-1.0.lua:120
unusable =
{
}
cannotDual = true
}
Lib =
{
Scanner = LibItemSearchTooltipScanner {
}
Matches = defined @BagSync\libs\LibItemSearch-1.2\LibItemSearch-1.2.lua:19
TooltipLine = defined @BagSync\libs\LibItemSearch-1.2\LibItemSearch-1.2.lua:41
TooltipPhrase = defined @BagSync\libs\LibItemSearch-1.2\LibItemSearch-1.2.lua:27
InSet = defined @BagSync\libs\LibItemSearch-1.2\LibItemSearch-1.2.lua:31
Tooltip = defined @BagSync\libs\LibItemSearch-1.2\LibItemSearch-1.2.lua:23
BelongsToSet = defined @BagSync\libs\LibItemSearch-1.2\LibItemSearch-1.2.lua:78
Filters =
{
}
}
(*temporary) =
{
artifact =
{
}
type =
{
}
sets =
{
}
items =
{
}
name =
{
}
requiredlevel =
{
}
level =
{
}
usable =
{
}
quality =
{
}
}
(*temporary) =
{
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to call field 'GetAzeriteCurrencyID' (a nil value)"

commented

Hmm and here I thought updating the Library would fix it. I will add a check for that error manually then. Thanks for putting in the ticket to let me know!

commented
commented

First of all thanks for your reply, currently I put this code

Lib.Filters.azerite = {
  keyword = C_CurrencyInfo.GetBasicCurrencyInfo(C_CurrencyInfo.GetAzeriteCurrencyID()).name:lower(),

  canSearch = function(self, operator, search)
    return not operator and self.keyword:find(search)
  end,

  match = function(self, link)
    return C_AzeriteItem.IsAzeriteItemByID(link) or C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItemByID(link)
  end
}

Temporarily eliminated this error after removing

commented

Removing the code is not a good way to fix it. Best is to check for Azerite coding and then if it's available then process the code. This will make it compatible with the Live version as well.

if C_AzeriteItem and C_CurrencyInfo.GetAzeriteCurrencyID then
	Lib.Filters.azerite = {
		keyword = C_CurrencyInfo.GetBasicCurrencyInfo(C_CurrencyInfo.GetAzeriteCurrencyID()).name:lower(),

		canSearch = function(self, operator, search)
			return not operator and self.keyword:find(search)
		end,

		match = function(self, link)
			return C_AzeriteItem.IsAzeriteItemByID(link) or C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItemByID(link)
		end
	}
end

I'll make a manual edit to the Library. I'll let the Library Author know there is an issue in the library with TBC.
https://github.com/Jaliborc/LibItemSearch-1.2/issues