Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- With it like this, I get an error saying Config is a nil value - I have the config loading later in .toc with same layout as yall use: modules/config.lua
- I notice from your modules that you have the callback in quotes - but if I try that it errors out saying I gave a string where it expected a function. What should I do?
- Thanks
- ]]--
- tradeskillmaster_BargainHunter.lua:
- local TSM = select(2, ...)
- TSM = LibStub("AceAddon-3.0"):NewAddon(TSM, "TSM_BargainHunter", "AceEvent-3.0","AceConsole-3.0")
- local AceGUI = LibStub("AceGUI-3.0") -- load the AceGUI libraries
- local L = LibStub("AceLocale-3.0"):GetLocale("TradeSkillMaster_BargainHunter") -- loads the localization table
- TSM.version = GetAddOnMetadata("TradeSkillMaster_BargainHunter", "Version")
- function TSM:OnInitialize()
- -- load the savedDB into TSM.db
- TSM.db = LibStub:GetLibrary("AceDB-3.0"):New("TradeSkillMaster_BargainHunterDB", savedDBDefaults, true)
- TSM.db.factionrealm.time = 10 -- because AceDB won't save if we don't do this...
- TSM:RegisterModule()
- end
- function TSM:RegisterModule()
- -- Regsiter with TSMAPI
- TSM.icons = { { side = "module", desc = "Bargain Hunter", slashCommand = "bh", callback = Config:Load, icon = "Interface\\Icons\\INV_JEWELCRAFTING_GOLDENBOAR" } }
- TSMAPI:NewModule(TSM)
- end
- -------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement