WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   C_AuctionHouse.ReplicateItems() - Problem (https://www.wowinterface.com/forums/showthread.php?t=57906)

flatt83 04-02-20 10:22 AM

C_AuctionHouse.ReplicateItems() - Problem
 
Hi there,

I've wrote a little piece to test out the abilities of the function C_AuctionHouse.ReplicateItems(), with a button which onclick executes the function,but it keeps returning nil. While executing the function, my auctionhouse-frame is open. storedVar is a saved Variable and the function doesn't seem to need any parameters.

Lua Code:
  1. local b = CreateFrame("Button", "MyButton", UIParent, "UIPanelButtonTemplate")
  2. b:SetSize(80 ,22)
  3. b:SetText("Button!")
  4. b:SetPoint("CENTER")
  5. b:SetScript("OnClick", function()
  6.     storedVar = ""
  7.     storedVar = C_AuctionHouse.ReplicateItems()
  8. end)

i'm fairly new to LUA and maybe i made a mistake somehow.

Any hint on what i'm possibly doing wrong would be appreciated.

Kanegasi 04-02-20 12:04 PM

It's doing nothing because you aren't passing any arguments. ReplicateItems is the 8.3 replacement for QueryAuctionItems. Check out the old function for more info: https://wow.gamepedia.com/API_QueryAuctionItems

flatt83 04-02-20 12:55 PM

yeah, i've read about the auctionhouse api-changes but my problem is, that the documentation states, that it is a replacement for a old allitems-query of QueryAuctionItems where the getAll parameter had to be set to 0 to download the complete data of the auctions. I've tried passing different sets of parameters, but i can't figure out a working one.

Ketho 04-02-20 03:11 PM

I'd say just from looking at Deprecated_8_3_0.lua you don't have to pass any parameters to ReplicateItems() and can subsequently call GetReplicateItemInfo(index) up to GetNumReplicateItems()

flatt83 04-02-20 05:10 PM

Thanks for your answer Ketho. Never noticed that the function has no return-values, the rest is somehow obvious.


All times are GMT -6. The time now is 10:34 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI