Quantcast
WoWInterface - View Single Post - Combine two lua scripts
View Single Post
06-21-20, 11:06 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,259
I don't know PitBull so I'm not sure what Status() or Angle() is doing but my best guess is that it has more than 1 return and all but the first one are being cut off because it's no longer the last return in the format.

Without thinking too hard, maybe something like still treating the return as two strings:

Lua Code:
  1. local s = Status(unit)
  2. if s then
  3.   return s
  4. end
  5. local r,g,b = ClassColor(unit)
  6. local string1 = string.format('|cff%02x%02x%02x%s|r %s%s%s|', r,g,b,Name(unit),Angle(AFK(unit) or DND(unit)))
  7. local cur,max = HP(unit),MaxHP(unit);
  8. local hr,hg,hb=HPColor(cur,max);
  9. return string1 .. "|cff%02x%02x%02x%.0f|r" or "", hr,hg,hb,100*cur/max
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote