WoW:API UnitXPMax: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 33: Line 33:


:[[API floor|floor(value)]] - Returns the floor of value.
:[[API floor|floor(value)]] - Returns the floor of value.
----
----
__NOTOC__
{{WoW API}}
{{Template:WoW API}}
[[Category:API Functions|UnitXPMax]]
[[Category:API Unit Functions|UnitXPMax]]

Revision as of 05:38, 4 January 2006

UnitXP - Documentation by VelvetPaw

Return the max XP of a "unit" - only seems to work with "player".

XP = UnitXPMax("unit")

Parameters

Arguments

("unit")
unit
String - The UnitId to select as a target.

Returns

XP
XP
Numeric - Returns the max XP points of the "unit".

Example

XP = UnitXP("player")
XPMax = UnitXPMax("player")
DEFAULT_CHAT_FRAME:AddMessage("Your XP is currently at "..floor( XP / XPMax ).."%."),1,0,0)

Info

DEFAULT_CHAT_FRAME:AddMessage("text",r,g,b)

ScrollingMessageFrame:AddMessage("text",r,g,b,id)
Valid Frame names:
DEFAULT_CHAT_FRAME
ChatFrame1 - ChatFrame7

UnitXP("unit")

UnitXP("unit") - Returns the number of experience points the specified unit has in their current level.

floor(value)

floor(value) - Returns the floor of value.

Template:WoW API