Then you're using different code. Line 78 in the code I posted (and you re-posted) is either and end or a blank line so, nothing to do with self:SetText()
I can't diagnose what I can't see. My best guess is you didn't use the updateData() function from my code in whatever your using. |
Quote:
1. If I want to make a similar addon, as I understand it, I will need to change (the code below) to which one? Lua Code:
2. how do I add a table title (in different languages) |
Both
Lua Code:
Lua Code:
Probably not a lot of point changing the addon title language unless you are going to post it in language specific sites under different names. If you are just hosting it on WowInterace/Curse/Wago people will find it using the single addon name which would be the same in any language so may as well be the title. To add a title, after: Lua Code:
add: Lua Code:
|
Quote:
|
Quote:
Lua Code:
You can then create FontStrings and set their texts using (set Rewards text): Lua Code:
xxx being the variable used when creating the FontString. You might want to see the wiki on localisation if it gets more complicated. |
Should I create a new lua file tablename.lua? With
Lua Code:
And add this file to table.lua Lua Code:
|
addon.Texts can go in the same file as addon.db as that seems to be where you're putting "data". Assuming that this file is listed in the .TOC file above the other (table.lua) file so it loads first.
Lua Code:
Goes after you've: Lua Code:
You can't fontstring:SetText(...) on a FontString that doesn't exist. |
Quote:
Lua Code:
|
Because you refuse to read and consider what has been written. In the last post, not even considered what was asked.
Most parts of an addon are created, positioned, formatted etc. in relation to something else depending on what you want your addon to do and how you want it to look and work. Not being a mind reader (and I can't read you screen), I'm not about to decide that for you, all I can do is offer suggestions on how you might do things. It's up to you work that information (if you think it might be useful) into your addon. With that in mind, not every code block is literal, someframe, somedrawlayer, somefont are for you to replace with whatever works for you and your addon. |
Quote:
I'll try to figure out the issue again. As I understand it, I can place this part of the code in the code file db.lua Lua Code:
Lua Code:
|
Correct,
Lua Code:
Replace someframe with the frame you want to be the parent of the new FontString The parent will effect the Fonstrings scale and when it's, shown/hidden etc. Replace somedrawlayer and somefont with the relevent information depending on where in the layer stack you want the string displayed and the font/size you want the text to be displayed in. See the docs for CreateFontString and see this page for some of the in-game fonts configurations ie. GameFontNormal, GameFontHighlight etc. etc. etc. You can't use someframe (whichever that frame is) to create the FontString until after the frame itself has been created (The order that code is placed (runs) matters). |
Quote:
https://www.wowinterface.com/downloa...o.php?id=26699 |
Congratulations:banana:
The more you play with it, the more you'll learn. Have Fun! |
All times are GMT -6. The time now is 09:18 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI