View Single Post
03-13-19, 03:46 AM   #8
Terenna
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 105
It's not that you're tainting the :SetSize, it's that you're tainting SetScale()

The following code is found within MultiActionBar_Update()

Lua Code:
  1. local scale = 1;
  2.     if ( contentHeight > availableSpace ) then
  3.       scale = availableSpace / contentHeight;
  4.     end
  5.     MultiBarRight:SetScale(scale);
  6.     if ( showLeft ) then
  7.       MultiBarLeft:SetScale(scale);
  8.     end
  9.     VerticalMultiBarsContainer:SetSize(contentWidth * scale, contentHeight * scale)

The game tries to MultiBarRight:SetScale(), but you've set it to nil. So the game knows something is tainted. The very next function it calls is VerticalMultiBarsContainer:SetSize() which throws the taint error.

Try

Lua Code:
  1. MultiBarRight:hookscript('SetScale', function()
  2.      if MultiBarRight:GetScale() ~= 0.8 then
  3.           MultiBarRight:SetScale(0.8)
  4.      end
  5. end)

You might want to try and print debug that hookscript, GetScale may not return exactly 0.8, it may return like 0.799999999999 or something stupid. You might want to do

if MultiBarRight:GetScale() > 0.81 then MultiBarRight:SetScale(0.8) end

Last edited by Terenna : 03-13-19 at 04:21 AM.
  Reply With Quote