Thread Tools Display Modes
09-15-23, 11:41 PM   #1
Sashapty
A Defias Bandit
Join Date: May 2023
Posts: 3
reduce player name size

Hello, I'm using the addon from this post https://www.wowinterface.com/forums/...ad.php?t=59179
it still works, but I started getting LUA errors. Please help me to fix this/
the addon itself:
Code:
local function SizeName(self) 
    local font, size = self.name:GetFont() 
    self.name:SetFont(font, size-1) 
end 
SizeName(PlayerFrame) 
SizeName(TargetFrame) 
SizeName(TargetFrameToT)
SizeName(FocusFrame)
for i=1, 4 do 
    SizeName(_G["PartyMemberFrame"..i]) 
end
and LUA error that I get:
Code:
Message: Interface/AddOns/FlickNameSize/core.lua:2: attempt to index local 'self' (a nil value)
Time: Sat Sep 16 08:36:27 2023
Count: 1
Stack: Interface/AddOns/FlickNameSize/core.lua:2: attempt to index local 'self' (a nil value)
[string "@Interface/AddOns/FlickNameSize/core.lua"]:2: in function `SizeName'
[string "@Interface/AddOns/FlickNameSize/core.lua"]:10: in main chunk

Locals: self = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index local 'self' (a nil value)"
  Reply With Quote
09-16-23, 11:01 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
I'm guessing this is in the Classic (Vanilla) version where the FocusFrame doesn't exist.

Remove/comment out the line:
Code:
SizeName(FocusFrame)
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
09-16-23, 03:45 PM   #3
Sashapty
A Defias Bandit
Join Date: May 2023
Posts: 3
Originally Posted by Fizzlemizz View Post
I'm guessing this is in the Classic (Vanilla) version where the FocusFrame doesn't exist.

Remove/comment out the line:
Code:
SizeName(FocusFrame)
Oh no, it`s retail dragonflight. The fact is that the addon itself works, but it causes a LUA error precisely when logging into a character or after a reload.
  Reply With Quote
09-16-23, 04:12 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
Ah, they moved party members to a FramePool

Try replacing
Lua Code:
  1. for i=1, 4 do
  2.     SizeName(_G["PartyMemberFrame"..i])
  3. end

with
Lua Code:
  1. for memberFrame in PartyFrame.PartyMemberFramePool:EnumerateActive() do
  2.     SizeName(memberFrame)
  3. end
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 09-16-23 at 04:24 PM.
  Reply With Quote
09-16-23, 05:10 PM   #5
Sashapty
A Defias Bandit
Join Date: May 2023
Posts: 3
Originally Posted by Fizzlemizz View Post
Ah, they moved party members to a FramePool

Try replacing
Lua Code:
  1. for i=1, 4 do
  2.     SizeName(_G["PartyMemberFrame"..i])
  3. end

with
Lua Code:
  1. for memberFrame in PartyFrame.PartyMemberFramePool:EnumerateActive() do
  2.     SizeName(memberFrame)
  3. end
Thank you, it works! Now there are no errors!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » reduce player name size


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off