trying to call placeholderG a nil value
Hello, I have a problem with this bit
Lua Code:
Apparently the placeholderG object is not filled properly. For instance, I did that for spells Lua Code:
and it work like a charm. Any idea what is happening here? |
Quote:
Maybe start by telling us where you got the idea to use placeholderG from? Edit: it's probably a reference to the _G global table. You should be able to use Code:
displayedName = tt.TextLeft1:GetText() |
To be honest, I can't remember when I started this so I have no idea where "placeholderG" comes from but I can assure you I didnt invented this name because it is not the style of naming I'm using.
Anyway, thank you :D it is clean and simple. I didn't knew I could access the macros titles just like this. |
tt, in this case the the GameTooltip frame. Blizzard have been moving the requirement to use _G[sub-region name] over to frame keys since the introduction of the parentKey attribute in XML.
|
As Fizzlemizz mentioned, it's _G, which is the global table in Lua. At some point, the code you have, or the code you got from someone else, was subject to a replace all in an editor where they replaced the underscore character with "placeholder". Typical coding practices use the underscore as a throwaway object for function returns they don't want, but in the case of _G, it is part of the name of that object.
|
All times are GMT -6. The time now is 01:57 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI