As suggested, this corrected version works just fine. I verified it last night:

[code:1]/run p="player"; O=100;D=" - ";E=GetXPExhaustion()X=UnitXP(p)Y=UnitXPMax(p)L=Un itLevel(p)SendChatMessage("XP: "..X.."/"..Y..D..floor((X/Y)*O).."% - NEXT LVL "..(L+1)..": "..(Y-X)..D..ceil(O-((X/Y)*O)).."% - "..floor((E/Y)*O).."% Rested "..E,PARTY);[/code:1]