WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   How work function C_AuctionHouse.PostIte (https://www.wowinterface.com/forums/showthread.php?t=58481)

lungdesire 12-24-20 07:42 AM

How work function C_AuctionHouse.PostIte
 
Hey.
This code work in chat:

/run C_AuctionHouse.PostItem(ItemLocation:CreateFromBagAndSlot(0, 1), 1, 1, nil, 190080000)

but dont work in my addon:

local function OnEvent(self, event, ...)
if event == "ITEM_SEARCH_RESULTS_UPDATED"
C_AuctionHouse.PostItem(ItemLocation:CreateFromBagAndSlot(0, 1), 1, 1, nil, 190080000)
end
end

local f = CreateFrame("Frame")
f:RegisterEvent("ITEM_SEARCH_RESULTS_UPDATED")
f:SetScript("OnEvent", OnEvent)

sezz 12-24-20 10:42 AM

it requires a hardware event, did you test putting it on a button?

lungdesire 12-25-20 12:04 AM

Quote:

Originally Posted by sezz (Post 338031)
it requires a hardware event, did you test putting it on a button?

You can show example? Thanks


All times are GMT -6. The time now is 02:48 AM.

vBulletin © 2021, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI