Thread: Guild Dues
View Single Post
08/20/18, 04:58 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,976
You call self:RestorePosition() but where is teh function GuildDues:RestorePosition() in your code?

The function createDonationButton is never executed so this button will not be created at all.
You'd need to put this function code at the top of your file as you have defined it locally and code in lua which is local neds to be on top of the call to that function.

Then you'd be able to put the call to "createDonationButton()" inside your function GuildDues:Initialize() e.g.

I'd avice you to read the wiki for "Getting started with addond evelopment" and not copy just code from other addons to your addon. You need to learn and undertand what you do and appearantly you are not understanding it so far.

Please go and visit the wiki, read the "Getting started part" and then "build the example addon":
http://wiki.esoui.com/Getting_Started
http://wiki.esoui.com/Writing_your_first_addon



Learn it, and then come back to your project to rebuild it (at best without the object stuff like GuildDues:Initialize() but normally like function GuildDues.Initialize().
The object stuff (check online fpr object oriented development) is only needed if you plan to build several objects of your class GuildDues. And I don't think you need this here.
  Reply With Quote