Thread Tools Display Modes
01-19-23, 11:35 PM   #1
TransformedBG
A Fallenroot Satyr
Join Date: Oct 2010
Posts: 23
Post I know that API Changed Just trying to make it work...

So classic addons crashed obviously since the API updated. one of the functions I was using was using.
GetCurrencyListSize() which simply changed to C_CurrencyInfo.GetCurrencyListSize()

however now no matter what I try it it's now returning nil

from my understanding it sould be returning a number

C_CurrencyInfo.GetCurrencyListSize()
Return values
# Name Type
1 currencyListSize number

even doing something similiar in game like
/script local zebra = C_CurrencyInfo.GetCurrencyListSize()
/print(zebra)

returns a nil value.

just looking for any thoughts or ideas. thanks
  Reply With Quote
01-22-23, 12:22 AM   #2
TransformedBG
A Fallenroot Satyr
Join Date: Oct 2010
Posts: 23
anyone? just bumping looking for answers..
  Reply With Quote
01-22-23, 05:51 AM   #3
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
The only thing I could think of was that maybe you had to have the addon Blizzard_TokenUI active and the currency page open for it to work.

But, looking at https://github.com/Gethe/wow-ui-sour...okenUI.lua#L66 the 3.4.1 version of the file doesn't seem to have the C_CurrencyInfo. portion of the function.

So, maybe that isn't the problem you are having.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
01-22-23, 01:03 PM   #4
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Not sure. Never tried this. But when you declare zebra local in the first line then the second line dont know about it? So working as intended?
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
02-06-23, 03:35 PM   #5
Vecamia
A Defias Bandit
 
Vecamia's Avatar
Join Date: Mar 2022
Posts: 2
In Wrath Classic it should still be GetCurrencyListSize()
Try /dump GetCurrencyListSize() and see if returns anything.

Or, all on one line:
/script local zebra = GetCurrencyListSize() print(zebra)


Being a local variable, in your /script /or macro it wont be available after the first line is executed and will return as nil since its not saved anywhere if call the print(zebra) on another line.
But if do the print function and variable setting on the same line, it should work.



I think this list is whats current on wrath/classic api wise:

https://wowpedia.fandom.com/wiki/Glo...ctions/Classic
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » I know that API Changed Just trying to make it work...


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