WoW:API GetPetExperience: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API GetPetExperience to API GetPetExperience without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<center>'''GetPetExperience''' </center>
{{wowapi}} __NOTOC__
 
Returns the pet's current XP total, and the XP total required for the next level.
Returns the pet's current XP total, and the XP total required for the next level.
currXP, nextXP = GetPetExperience();


    currXP, nextXP = GetPetExperience();
==Parameters==
 
===Returns===
----
;''Arguments''
 
:<i>none</i>
 
----
;''Returns''
 
:(currXP, nextXP)
 
:;currXP : Number - The current XP total
:;currXP : Number - The current XP total
:;nextXP : Number - The XP total required for the next level
:;nextXP : Number - The XP total required for the next level


----
==Example==
;''Example''
  local currXP, nextXP = GetPetExperience();
  local currXP, nextXP = GetPetExperience();
  PetPaperDollFrameExpBar:SetMinMaxValues(min(0, currXP), nextXP);
  DEFAULT_CHAT_FRAME("Pet experience: " .. currXP .. " / " .. nextXP);
PetPaperDollFrameExpBar:SetValue(currXP);
===Result===
 
Pet experience is displayed in the default chat frame.
----
;''Description''
 
: Returns the pet's current XP total, and the XP total required for the next level.
 
 
----
{{WoW API}}

Latest revision as of 04:46, 15 August 2023

WoW API < GetPetExperience

Returns the pet's current XP total, and the XP total required for the next level.

currXP, nextXP = GetPetExperience();

Parameters[edit]

Returns[edit]

currXP
Number - The current XP total
nextXP
Number - The XP total required for the next level

Example[edit]

local currXP, nextXP = GetPetExperience();
DEFAULT_CHAT_FRAME("Pet experience: " .. currXP .. " / " .. nextXP);

Result[edit]

Pet experience is displayed in the default chat frame.