Thread Tools Display Modes
02-15-14, 02:21 PM   #1
nickyjean
Premium Member
Premium Member
Join Date: Sep 2008
Posts: 284
Requesting Assistance with Baud Auction

Hello,

I've been piecing this addon together since it went out of commision and I haven't had to many problems with it. I'm not a developer at all (only a little html) but been able to cut and paste fixes when something come up.

Lately with Battle Pets, I've been getting a UI error. ---Please see below---

It lists an error with BaudAuction. Would anyone be willing to explain the error to me and maybe some sort of fix with Baud Auction. Virtual hugs and Thanks
Message: Interface\AddOns\BaudAuction\BaudAuction.lua:469: Usage: GameTooltip:SetHyperlink(link)
Time: 02/15/14 14:17:58
Count: 1
Stack: [C]: in function `SetHyperlink'
Interface\AddOns\BaudAuction\BaudAuction.lua:469: in function <Interface\AddOns\BaudAuction\BaudAuction.lua:451>

Locals: (*temporary) = GameTooltip {
0 = <userdata>
updateTooltip = 0.1079999960959
comparing = false
shoppingTooltips = <table> {
}
}
(*temporary) = nil
  Reply With Quote
02-15-14, 06:58 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You can't use GameTooltip:SetHyperlink with caged battle pets. So, you need to check whether the link you're working with is for a caged battle pet, and use a different method to display those:

Code:
-- You must set the GameTooltip's position first, even for battle pets:
GameTooltip:SetOwner(YOUR_FRAME_HERE, "ANCHOR_TOPLEFT")
-- Check the link type:
if strmatch(link, "|Hbattlepet:") then
     -- Battle pet link
     local _, speciesID, level, breedQuality, maxHealth, power, speed, name = strsplit(":", link)
     BattlePetToolTip_Show(tonumber(speciesID), tonumber(level), tonumber(breedQuality), tonumber(maxHealth), tonumber(power), tonumber(speed), name)
else
    -- Other kind of link, OK to use GameTooltip
    GameTooltip:SetHyperlink(link)
end
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
02-16-14, 03:31 PM   #3
nickyjean
Premium Member
Premium Member
Join Date: Sep 2008
Posts: 284
thank you very much. This now works as intended.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Requesting Assistance with Baud Auction


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