Vladinator / wow-addon-compactvendor

Other
2 stars 0 forks source link

Lua Error at Timewalking Vendor #17

Closed wheatbread closed 1 month ago

wheatbread commented 1 year ago

Hi,

I got the following error when talking to Auzin, the WOTLK timewalking vendor this week:

20x CompactVendor/core.lua:770: bad argument #1 to 'ipairs' (table expected, got nil) [string "=[C]"]: in functionipairs' [string "@CompactVendor/core.lua"]:770: in function <CompactVendor/core.lua:768> [string "@CompactVendor/core.lua"]:794: in function Refresh' [string "@CompactVendor/core.lua"]:819: in functionUpdatePending' [string "@CompactVendor/core.lua"]:847: in function <CompactVendor/core.lua:845>

Locals: (temporary) = nil (temporary) = "table expected, got nil" = defined =[C]:-1 `

I'm using v10.0.2.221231 on retail.

Veyska commented 1 year ago

Occurs with every vendor I've spoken to so far, so not limited to just the TWing vendor.

Tarkumi commented 1 year ago

Quick fix:

Replace these lines at 768:

    local function IsPending(rawData)
        local args = rawData.lines[1].args
        for _, arg in ipairs(args) do
            if arg.field == "leftText" then
                return IsTooltipTextPending(arg.stringVal)
            end
        end
    end

With this:

    local function IsPending(rawData)
        if rawData.lines[1].leftText then
            return IsTooltipTextPending(rawData.lines[1].leftText)
        end
    end
Vladinator commented 2 months ago

I recently looked at the mentioned vendors and noticed it was due to changes in how tooltips are scanned.

I hope that the latest update fixed this issue, and made the vendors usable again.

(On a side-note, searching will be fixed soon when I update the libraries to a newer version that also supports the tooltip changes.)