WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   NameplateColors - "SetTargetClampingInsets" error (https://www.wowinterface.com/forums/showthread.php?t=55127)

Dasteman 02-12-17 01:52 PM

NameplateColors - "SetTargetClampingInsets" error
 
Hello there,
I'm using addon NamePlateColors which is giving me this error:
Lua Code:
  1. 1x [ADDON_ACTION_BLOCKED] AddOn 'NameplateColors' tried to call the protected function 'SetTargetClampingInsets()'.
  2. !BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
  3. [C]: in function `SetTargetClampingInsets'
  4. ...eBlizzard_NamePlates\Blizzard_NamePlates.lua:221: in function `SetupClassNameplateBars'
  5. ...eBlizzard_NamePlates\Blizzard_NamePlates.lua:74: in function `OnNamePlateAdded'
  6. ...eBlizzard_NamePlates\Blizzard_NamePlates.lua:38: in function <...eBlizzard_NamePlates\Blizzard_NamePlates.lua:32>
  7.  
  8. Locals:

Do you know what's causing this error and how to fix it?

Marsgames 02-12-17 05:01 PM

I can't really help you but it seams that only Blizzard can use the function "SetTargetClampingInsets()" so it won't work.

Unfortunately I can't help you more than that, sorry

Kanegasi 02-12-17 05:44 PM

Ever since the introduction of the new nameplates, this is now the common "vague taint" error that quite a few addons are getting, along with the CompactRaidFrame error that's been around for years. Some addons even report both. We know that the CompactRaidFrame error stems from using Blizzard's DropDownMenu but no one has figured out what causes this SetTargetClampingInsets error yet.

Resike 02-12-17 11:24 PM

I'm almost sure that it's caused by UnitSelectionColor or GameTooltip_UnitColor or both.

Ketho 02-13-17 10:36 AM

Related from this thread http://www.wowinterface.com/forums/s...ad.php?t=54635

I tested with KuiNameplates, TidyPlates and ElvUI and they don't have this problem
While Plater and NameplateColors do taint in combat



When setting the r, g, b fields on a healthbar it taints. Omitting it still works but .SetStatusBarColor will then be called everytime, fwiw
https://github.com/Gethe/wow-ui-sour....lua#L396-L406
Lua Code:
  1. hooksecurefunc("CompactUnitFrame_UpdateHealthColor", function(frame)
  2.     local r, g, b = 1, 0, 0
  3.     if r ~= frame.healthBar.r or g ~= frame.healthBar.g or b ~= frame.healthBar.b then
  4.         frame.healthBar:SetStatusBarColor(r, g, b) -- doesnt taint
  5.         frame.healthBar.r, frame.healthBar.g, frame.healthBar.b = r, g, b -- taints
  6.     end
  7. end)

Hopefully it's fixed now, but please give your feedback otherwise
https://github.com/Ketho/NameplateCo...0a3bcc65da029d

Dasteman 02-14-17 07:21 AM

Thank you for the update. Now works great without any Lua errors. Cheers:)

---


All times are GMT -6. The time now is 10:26 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI