Quantcast
WoWInterface - View Single Post - How work function C_AuctionHouse.PostIte
View Single Post
12-24-20, 07:42 AM   #1
lungdesire
A Deviate Faerie Dragon
Join Date: May 2020
Posts: 13
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)
  Reply With Quote