Thread Tools Display Modes
03-30-11, 03:36 AM   #1
karl_w_w
A Murloc Raider
Join Date: Mar 2010
Posts: 8
Problem with AH scanning

I've written the following addon, which scans the auction house to find the total price of vial of the sands mats: http://www.pastey.net/148490

The problem I have is the first time I type /vc it will search for Truegold and the results will be shown, and if I have /eventtrace open I will see AUCTION_ITEM_LIST_UPDATE, but VialCrafter_event() won't be called. If I type /vc again it will work fine.

I have tried with all other addons disabled, and I have also tried moving VialCrafter_Frame:RegisterEvent("AUCTION_ITEM_LIST_UPDATE"); into the OnLoad (in case it's some sort of delay in registering for the event) but nothing has had any effect.

Anybody have any ideas/see any problems in my code? Thank you.
  Reply With Quote
03-30-11, 04:11 AM   #2
Ammo
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 17
in your .xml

<OnEvent>self:SetScript("OnEvent", VialCrafter_event);</OnEvent>

change to:

<OnEvent> vialCrafter_event(); </OnEvent>

And in your OnLoad function make sure you do VialCrafter_Frame:RegisterEvent("SOMEAUCTIONHOUSEEVENT_I_WANT_TO_LISTEN_TO");
NVM: you already register from the slashcommand,. ignore the registerevnet
  Reply With Quote
03-30-11, 04:43 AM   #3
karl_w_w
A Murloc Raider
Join Date: Mar 2010
Posts: 8
Thanks a lot, that did the trick.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Problem with AH scanning


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off