Compact Vendor

Compact Vendor

16.5k Downloads

Lua Error at Timewalking Vendor

wheatbread opened this issue ยท 3 comments

commented

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 function ipairs'
[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 function UpdatePending'
[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.

commented

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.)

commented

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

commented

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