View Single Post
10-21-23, 03:17 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,892
Replace the print with SendChatMessage:
Lua Code:
  1. /run if UnitExists("target") then local h,m = UnitHealth("target"),UnitHealthMax("target") SendChatMessage(format("%s's Health: %3.1f%%", UnitName("target"),(h/m)*100), "SAY") else print("No Target") end

See the docs for restrictions on using SendChatMessage.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote