WoW:API GetCoinTextureString: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(initial documentation)
 
m (Move page script moved page API GetCoinTextureString to WoW:API GetCoinTextureString without leaving a redirect)
 
(No difference)

Latest revision as of 04:45, 15 August 2023

WoW API < GetCoinTextureString

Breaks down an amount of money into gold/silver/copper, inserts appropriate "|T" texture strings for coin icons, and returns the resulting string.

formattedAmount = GetCoinTextureString(amount[, fontHeight]);

Parameters

Arguments

amount
Integer - the amount of money in copper (for example, the return value from GetMoney)
fontHeight
Integer - (optional) the height of the coin icon; if not specified, it defaults to 14 (or the chat window font size? unsure)

Returns

formattedAmount
String - a string suitable for printing or displaying

Example

/script print(GetCoinTextureString(12345))
Template:Cost