Fandom

WoWWiki

API GetCoinText

104,637pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

WoW API < GetCoinText

Breaks down an amount of money into gold/silver/copper, inserts separator strings, and returns the resulting string.

formattedAmount = GetCoinText(amount, "separator");

Parameters Edit

Arguments Edit

amount
Integer - the amount of money in copper (for example, the return value from GetMoney)
"separator"
String - a string to insert between the formatted amounts of currency, if there is more than one type

Returns Edit

formattedAmount
String - a (presumably localized) string suitable for printing or displaying

Example Edit

/script print(GetCoinText(12345," "))
1 Gold 23 Silver 45 Copper
/script print(GetCoinText(12345,"X"))
1 GoldX23 SilverX45 Copper

Also on Fandom

Random Wiki