Go to Page... |
Compatibility: | Markarth (6.2.5) |
Updated: | 02/13/21 02:44 PM |
Created: | 01/07/21 11:14 AM |
Monthly downloads: | 172 |
Total downloads: | 5,063 |
Favorites: | 7 |
MD5: | |
Categories: | Beta-version AddOns, Auction House & Vendors, Bags, Bank, Inventory |
File Name |
Version |
Size |
Uploader |
Date |
0.0.2 |
4kB |
be.ste |
01/10/21 12:07 PM |
|
0.0.1 |
4kB |
be.ste |
01/07/21 11:14 AM |
Comment Options |
be.ste |
View Public Profile |
Send a private message to be.ste |
Send email to be.ste |
Find More Posts by be.ste |
Add be.ste to Your Buddy List |
01/07/21, 12:40 PM | |
|
@Baertram
Thanks a lot for your input! This will help and also helps understanding some of the LUA. I will very probably consider them all in the next update(s). Ya, I was a bit lazy about NA/EU differenciation. And wanted it to work fast (for me), me only playing on one of the servers. Now you already exactly described what to do, so thanks a lot! That makes it easy for me to fix that. |
|
be.ste |
View Public Profile |
Send a private message to be.ste |
Send email to be.ste |
Find More Posts by be.ste |
Add be.ste to Your Buddy List |
01/07/21, 12:08 PM | |
|
Hi and welcome to addon development
A few hints about your files and code. txt manifest file: You shouldn't include empty lines like ## OptionalDependsOn: They only stress the parse tools lua code: self -> normally only used for "classes". It works for your addon, but you have not defined PurchaseTracker as a "class" via ZO_Object:Subclass() So basically you shouldn' use self in the code, but jst reference the variable directly, in your case PurchaseTracker. It's "only" a table Code:
PurchaseTracker = {} Code:
ZO_Object.New(self) ) That said your functions should neither the : notation, but only . then. Class notation: Lua Code:
Normal table notation: Lua Code:
SavedVariables: Lua Code:
And instead of 'PurchaseTracker' use GetWorldName() then, which will return "NA Megaserver" or "EU Megaserver" depening on where you are logged in to. Maybe your addon here does not need this difference, but perhaps others will. So always think about it at first if you need to use SVs, as changing them later will often reset the data (as changing the SV version does!) and make users angry :-) Global variables: Better NOT name local variables like exisitng global ones! Your code: Lua Code:
Works but well, could cause issues. Just name it slightly different like using a non-capital first character Lua Code:
Easier to read AND see it's NOT the global variable you are refereincing there. IF you really need to directly use the global variable, then just USE the global name AwesomeGuildStore. -> _G["AwesomeGuildStore"] is nothing different than AwesomeGuildStore. Libraries: You have named the lib LibGetText and LibChatmessage as dependencies. Why? They are not used in your addon? Your code about them is commented! Btw: If you add AGS alread as dependency, and AGS got those as needed dependencies, they will be automatically enabeld before AGS and AGS before your addon, so your addon does not need to depend on them as well anymore. This would only be neccesary IF you have added the libraries as OptionalDependencies. But as AGS is a non-optional, so to say a "rea dependency", you won't have a problem removing them from your dependency list. I'd definately remove them as long as you do not really use them in your code!
Last edited by Baertram : 01/07/21 at 12:12 PM.
|
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |