Small bug in my nameplate addon, the castbar, wtb help of lua genius please.
1 Attachment(s)
Hey, I have been using a heavily edited version of SH_Nameplates, a addon that hasn't been updated for 2+years now and I kept alive through my poor lua skills. Half a year ago the addon's castbar randomly broke and I came here for some help and a kind member called "Oppugno" fixed it for me.
Sadly the addon on PTR/BETA is broken again in the same section, the name of the spell and the spell duration no longer shows, also if a mob is casting, and WHILE it is casting I target said mob, the castbar decides to grow in hight X10. http://www.wowinterface.com/forums/s...ad.php?t=48963 Thats the old post. I hope perhaps someone can help me out here once again. Thanks anyone for reading this and possibly helping me. /Nuckels |
I haven't looked at the code, but whatever the problem is is certainly fixable... however, at this point, you would probably be better off just switching to any of the many nameplate addons that are still actively maintained by their authors. Searching for "plate" should find them all.
|
|
Yeah, that's what I use as well, but there are others to choose from if you prefer another style. :p
|
Quote:
Edit: disabling " if self:IsShown() ~= 1 then return end " makes them work again, what does that line exactly do? It returned a 1 on beta so I just decided to disable it but ya. Edit 2: perhaps it helps if i link all the code, so ya here that line is alreayd disabled that part with -- Lua Code:
|
Never compare something like IsShown() to an explicit value like 1 or true, you should pretty much always just do "if not f:IsShown() then" to check that it's not being shown.
I don't think OnSizeChanged can even fire for a hidden frame, anyway. Just remove the line, it doesn't do anything. It's breaking the function because IsShown() can never return 1 (it returns true on the beta). This is not the only place you're comparing IsShown() to 1, so you'll have to clean up a few other areas. |
Quote:
|
Quote:
I'm not sure why Blizzard was using 1/nil in the first place, since even Lua 5.0 (the version of Lua initially used by the game) had proper booleans. |
WoW was in development long before 2003 (the release date of lua 5.0), so they probably used a previous version. Since everything that is not nil / false(post lua 5.0) is true, true booleans were probably pretty low on their list
|
Ok i just keep breaking stuff, imma just ask if anyone here with lots of addon knowledge and some time would like to clean up the addon.
Would greatly appreciate it, can throw in a beta key for WoD for anyone who can help. |
DO you happen to have a screenshot of it in action?
|
Quote:
|
Both actually.
I do agree with someone elses opinion you might be better of migrating to something else; but if we know what they look like - we might be able to make better recommendations. Or find an incentive to fix it :) |
Quote:
The bug isn't on this screenshot but its basicly that all the text doesn't appear beneath the castbar, but as mentioned previously I managed to fix that but then found out the entire addon coding is borked due to the above posters. |
NOt the best coder out there - most certainly not. But the reason I asked for screenshots - is because it's not the code that got you, it's the way it looks. Perhaps some currently working nameplates will suit your look just fine.
As it is right now; I do think there are a few that come close, so with slight mods could definitely look exactly the same. Might be easier than restoring what you currently have. |
Ok well it works without errors so its good enough, but how do I disable the blizzard boss "icon" on the nameplte? It shows the dragon portrait around my nameplates.
|
All times are GMT -6. The time now is 11:43 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI