how to disable oUF element by conditionals
I have never needed to do thios so i never tried - i just need the correct syntax.
Basically i use oUF class icons for everyone but warlocks, since i have made my own script. So, while before 5.1 i just didn't define self.ClassIcons for locks (i called if myclass monk, pala, priest) and everything is working, now i need to include them otherwise the classicons module returns me an error not finding the elements. I can hide the frames, but this way code would be running twice for the same thing and i want to avoid that. Any help will be appreciated. |
1) Post the error.
2) Post your code. |
|
You must either have an old version of oUF, or you modified the file, because that line the error comes from doesn't even exist in the current version.
|
Get the latest version of oUF from Haste's GitHub repository, by clicking the "ZIP" button here:
https://github.com/haste/ouf However, you will still get another version of the same error with the current version of oUF, because your code is defining a ClassIcons member for all classes, instead of only defining it if you actually create the frames. Here is a stripped-down version of your code that should help you see the problem: Code:
local ClassIcons = {} Change your code to something more like this to solve the problem: Code:
if myClass == "MONK" or myClass == "PRIEST" or myClass == "PALADIN" then |
Thanks a lot! Gonna fix the issue right now.
|
All times are GMT -6. The time now is 01:27 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI