Well ty again guys, i do appreciate all your help. I am having trouble with another issue now and it keep reading and still havent found my answer so possibly maybe you could also give me alil more help. What im trying to do is have my minimap icon remember its position and well i just cant seem to figure this one out, ive read 5 different sites and each one seems to have completely different ways of doing it and i cant seem to get any of them to work, so ill post my LUA file and see if you could possibly point me in a direction other than ive attempted.
Lua Code:
local db;
local defaults = {
profile = {
LDBIconStorage = {},
},
};
local malObject = {
type = "launcher",
icon = "Interface\\Addons\\MaggzAutoLog\\disabled",
label = "MaggzAutoLog",
OnClick = function(self, button)
if button == "RightButton" then
LOGSTATE()
end
if button == "LeftButton" then
if LoggingCombat() then
disablelogging()
else
enablelogging()
end
end
end,
OnTooltipShow = function(tooltip)
tooltip:AddLine("|cff00FF00MaggzAutoLog|r");
tooltip:AddLine("hold left mouse button to drag");
tooltip:AddLine("right click to enable/disable logging");
if LoggingCombat() then
tooltip:AddLine("Logging |cff00FF00Enabled|r");
else
tooltip:AddLine("Logging |cffFF0000Disabled|r");
end
end,
};
function updateDB(self, event, database)
db = database.profile;
LibStub("LibDBIcon-1.0"):Refresh("MaggzAutoLogDB", db.LDBIconStorage);
end
local vars = LibStub("AceDB-3.0"):New("MaggzAutoLogBD", defaults);
vars:RegisterCallback("OnProfileChanged", updateDB);
vars:RegisterCallback("OnProfileCopied", updateDB);
vars:RegisterCallback("OnProfileReset", updateDB);
db = vars.profile;
LibStub("LibDataBroker-1.1"):NewDataObject("MaggzAutoLogDB", malObject);
LibStub("LibDBIcon-1.0"):Register("MaggzAutoLogDB", malObject, db.LDBIconStorage);
That is the part of my LUA that has anything to do with my icon aside from my already assigned functions:
LOGSTATE()
enablelogging()
disablelogging()
my toc file contains a line reading ## SavedVariables: MaggzAutoLogDB
i cant seem to figure out what im doing wrong. its probably something so simple and im just too dumb to figure it out.