Setting a CVar doesn't work when including it in an addon
Hi.
Apparently CVars aren't being saved when you log out (well, some aren't being saved) so I gotta hit a macro with the following CVars everytime I log in: Code:
/run SetCVar ("nameplateSelfTopInset", .55) However it doesn't work at all. I still gotta hit the macro everytime I log in and the altered cvars reset themselves upon logout/reload UI. What am I missing here, what can I do? |
You have to wait until after the VARIABLES_LOADED event fires or your changes will just get reverted back when the cvar settings are loaded.
|
Are you using another addon that modifies nameplates in some way? They usually change those settings.
|
Quote:
Quote:
|
Quote:
SetCVar('nameplateSelfTopInset',core.profile.cvar_self_clamp_top) is called "Self clamp top" SetCVar('nameplateSelfAlpha',core.profile.cvar_self_alpha) is called "Self alpha" The personal resource bar is just a nameplate, most nameplate cvars apply to it aswell, doesn't matter if you disable personal resource bar modifications in KUI nameplates. |
Quote:
Code:
local EventFrame = CreateFrame("Frame") |
Quote:
Quote:
|
You could try disabling ALL your addons - if you set a cvar (even if you only do it with a macro) and it changes back after relogging or reloading the UI there's most likely some other addon changing it.
If it works without any other addons you can either renable your addons one by one or use an editor that can search in all files in a directory (VS Code or Sublime Text for example) and search for nameplateSelfTopInset and nameplateSelfAlpha in your addons directory. |
All times are GMT -6. The time now is 06:52 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI