WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Released AddOns (https://www.wowinterface.com/forums/forumdisplay.php?f=9)
-   -   Help getting item price data (https://www.wowinterface.com/forums/showthread.php?t=1726)

Sorian 09-17-05 05:52 PM

Help getting item price data
 
I'm trying to get backpacktotal to work with KC_Items. I've gotten it to work so far except for one error. Iget the following error only when I log in. I cna move items around and such and the total value will update and everything works properly. That first error is the only problem.

Here's the error: Interface\Addons\AceDB.lua:81 :attempt to index local `node' (a nil value)

Here's the code I'm using to get price info:
if ((KC_SellValue) and (myValue < 1)) then
local KCitemCode = KC_Items:GetCode(itemLink);
myValue = KC_SellValue:GetPrice(KCitemCode);
end

Anyone have any ideas?

Kaelten 09-17-05 05:58 PM

try changing

Code:


local KCitemCode = KC_Items:GetCode(itemLink);
myValue = KC_SellValue:GetPrice(KCitemCode);

to

Code:


local KCitemCode = KC_Items:GetCode(itemLink);
if (KCitemCode) then
myValue = KC_SellValue:GetPrice(KCitemCode);
end

that error is generally caused by a nil path being sent into the AceDB class. I think this will filter that out.

Sorian 09-17-05 07:36 PM

Change didn't help. I made a debug line to show the value of KCitemCode in the text box as each item was being scanned and didn't see any nil or weird values. I also changed the TOC file to make titan panel and KC items a dependency so those 2 addons would load first, no dice.

Sorian 09-17-05 07:57 PM

Fixed
 
Addon worls perfectly now. I updated to the new version of ace and changed the event handler. The addon author had a weird event handler. Don't know which one fixed it but it works so that's cool. Thanks for your help.

Kaelten 09-17-05 08:16 PM

hehe glad it works.


All times are GMT -6. The time now is 09:18 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI