Thread Tools Display Modes
12-22-23, 09:35 AM   #1
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,894
In both the code files you have
Code:
local db = {}
This is creating distinctly different db variables.

In the main file add db to your ns table and get it from there in the ChatCommands.lua file.

Or use MapNotesMiniButton.db in the ChatCommands.lua file, whichever db is the right one and is available in both files either via a global or the ns table.

A quick look further and in the main file you're creating
Code:
local db = {}
and then throwing it away in PLAYER_LOGIN and replacing it with
Code:
db = self.db.profile
Where self is Addon. Which means Addon should be added to your ns table and in ChatCommands use:
Code:
local db = NS.Addon.db
or give the frame a name and use that.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-22-23 at 10:56 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » minimap button created with LibDBIcon need help


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off