Adding %HP to default nameplates; getting an error occasionally
View Single Post
03-30-18, 05:48 PM
A Pyroguard Emberseer
Join Date: Sep 2007
The issue is that you're scanning for nameplates by looping through the children of WorldFrame, then you're trying to call a function on the frame (
), and if that frame happens to be forbidden it will throw an error.
You could add a check like
if not plate:IsForbidden()
, and put the rest of your function inside of that, or you can use the actual nameplate events that they added a couple years ago with the launch of Legion (
The protected friendly nameplates in instances are implemented in a way that addons don't need to do anything to account for their existence; they don't trigger the same nameplate events and are completely separate from the standard nameplate frames, so unless you're doing something like actively scanning through every child of WorldFrame, you won't accidentally encounter them.
View Public Profile
Send a private message to semlar
Find More Posts by semlar