View Single Post
12-22-23, 09:35 AM   #10
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,892
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