View Single Post
10-26-16, 03:44 PM   #3
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Hi,

Your check is failing because CanSendAuctionQuery returns a boolean (true/false), but you check for 1. A lot of functions that now returns a boolean used to return 1/nil, which probably is the info that you found?

Don't know about the event. Add a print in the event handler to see if the event is firing as expected.

Some other feedback, if you don't mind! You're leaking a lot of global variables needlessly. This is not inherently bad, at least not as long as they are uniquely named, but generally you should avoid globals unless you have a reason to use them.

All of these are global which may conflict with other addons that made the same mistake, or worse; the default UI.
Code:
name, texture, count, quality, canUse, level, minBid, minIncrement, buyoutPrice, bidAmount, highestBidder, owner, sold=GetAuctionItemInfo("list",tableloop)
Functions can and should also be made global, though the ones you need to reference in the XML need to be global.

You don't need to declare variables local separately before assigning values to them. Just do it on the same line.

I would also recommend looking into creating your frames in Lua instead of XML. It will require some work, but you may find that it's smoother than dealing with XML.
__________________
Grab your sword and fight the Horde!
  Reply With Quote