Hi @all
I use for my XP display the following lines:
Lua Code:
local function GetPlayerXP()
return UnitXP("player"), UnitXPMax("player")
end
and
Lua Code:
local XP, maxXP = GetPlayerXP()
local restXP = GetXPExhaustion()
local percXP = math.floor((XP / maxXP) * 100)
The last line gives rise to the error mentioned in the thread title. The funny thing here is that I use the same script on the live server and it works there. Also on the Beta server, the correct values are calculated and shown what you see on the screenshot below.
The error also occurs only at login and at each subsequent reload it exists not even. My question now is ... Do I have a mistake, I do not see the forest for the trees or Blizzard has an error return values?
Thanks in advance for all input.
greetz
liquid