Local colors from 'RAID_CLASS_COLORS'
Trying to update a weakaura thats attempting to color the unit frames based off of this
Quote:
|
try
Code:
function() |
So.. it works. but it didnt fix the issue.
i figured out a way to replicate the error though. if im targeting myself and zone into another area it gives me this error Quote:
im not sure if this is just happening because im zoning in and had a target when it refreshed the color table.. but there isnt a target to find the class of.. |
It's possible there's a problem with accessing global variables within the aura environment during loading screens. WeakAuras attempts to keep aura environments restricted. You can try collecting the color data in a custom init (initialize), storing it in aura_env, and then just using that.
To use the custom init in an aura, click the Actions tab, check Custom under On Init, then put the following in the box that shows up: Lua Code:
Now in your color function: Lua Code:
On Init happens once when the aura loads, which means it'll only load the colors on UI load and every time you close the WeakAuras window. Since the color data is now saved within the aura environment, it's always there for use by the aura. |
it really doesnt like that. constant errors when i put that in place of the original.
i think its okay though... the errors only happen once per load so its not going to effect performance at all. ill probably just hide the errors. |
You can default to a class if UnitClass returns nil:
Lua Code:
|
All times are GMT -6. The time now is 05:46 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI