Kiatra / Broker_MicroMenu

1 stars 5 forks source link

3 errors regarding a call/index of a nil value #13

Open nottlethegnome opened 3 months ago

nottlethegnome commented 3 months ago

Evening, I am experiencing the following errors (attached belowe)

I did try some of the edits noted in the other issues on this page, but the issues persist. Please advise. Thank you!

  1. Local (error) - 673

83593x Broker_MicroMenu/Broker_MicroMenu.lua:94: attempt to index upvalue 'db' (a nil value) [string "@Broker_MicroMenu/Broker_MicroMenu.lua"]:94: in function `UpdateText' [string "@Broker_MicroMenu/Broker_MicroMenu.lua"]:313: in function <Broker_MicroMenu/Broker_MicroMenu.lua:310>

Locals: self =

{ } fps = 48 = 6.101190 = 0.229459 latencyHome = 55 latencyWorld = 60 colorGood = "|cff00ff00" fpsColor = "" colorHome = "" colorWorld = "" (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = "attempt to index upvalue 'db' (a nil value)" db = nil dataobj =
{ } path = "Interface\AddOns\Broker_MicroMenu\media\" string =
{ } _G =
{ ERR_OUT_OF_CHI = "Not enough chi" DH_HAVOC_CORE_ABILITY_2 = "Strong melee attack that consumes Fury. If it critical strikes, some Fury is refunded." MultiCastActionButton6Cooldown = MultiCastActionButton6Cooldown { } MerchantItem9ItemButtonStock = MerchantItem9ItemButtonStock { } UNIT_NAMES_COMBATLOG_TOOLTIP = "Color unit names." HUD_EDIT_MODE_SETTING_ACTION_BAR_HIDE_BAR_ART = "Hide Bar Art" LE_GAME_ERR_CHAT_RAID_RESTRICTED_TRIAL = 784 MultiBarLeftActionButton10NormalTexture = MultiBarLeftActionButton10NormalTexture { } SPELL_FAILED_CUSTOM_ERROR_71 = "This partygoer wants to dance with you." LE_GAME_ERR_PET_SPELL_TARGETS_DEAD = 422 ERROR_CLUB_TICKET_COUNT_AT_MAX_COMMUNITY = "Can't create any more invite links for this community." RecruitAFriendFrame = RecruitAFriendFrame { } MultiBar7ActionButton5Icon = MultiBar7ActionButton5Icon { } TutorialFrameLeft19 = TutorialFrameLeft19 { } MultiCastActionButton2Cooldown = MultiCastActionButton2Cooldown { } ERR_TRADE_EQUIPPED_BAG = "You can't trade equipped bags." PVP_RANK_6_1 = "Corporal" MultiBarLeftButton7 = MultiBarLeftButton7 { } OPTION_TOOLTIP_SHOW_MULTIBAR4 = "Attached to the left side of Right Action Bar 1 by default" LE_GAME_ERR_INVALID_FOLLOW_PVP_COMBAT = 376 MerchantItem3AltCurrencyFrameItem1Text = MerchantItem3AltCurrencyFrameItem1Text { } PROFESSIONS_COLUMN_REAGENTS_NONE = "None" OPTION_SHOW_ACTION_BAR5_TOOLTIP = "Attached to the left side of Action Bar 4 by default" BINDING_NAME_NAMEPLATES = "Show Enemy Nameplates" CHAT_HEADER_SUFFIX = ": " COVENANT_MISSIONS_HEALTH = "Health" MAIL_LETTER_TOOLTIP = "Click to make a permanent copy of this letter." PVPReadyDialogBottomArt = PVPReadyDialogBottomArt { } MultiBar6Button4Flash = MultiBar6Button4Flash { } CALENDAR_RAID_RESET_DESCRIPTION = "%1$s resets at %2$s." HubPanelSettingsDamageFriendlySpotlightModeLeft = HubPanelSettingsDamageFriendlySpotlightModeLeft { } CHAT_CONFIG_OTHER_COMBAT =
{ } RematchGameTooltipTexture13 = RematchGameTooltipTexture13 { } ClassNameplateBarPaladinFrameRune5 = ClassNameplateBarPaladinFrameRune5 { } TutorialFrameRight19 = TutorialFrameRight19 { } BN_UNABLE_TO_RESOLVE_NAME = "Unable to whisper '%s'. Blizzard services may be unavailable." CinematicFrameRaidBossEmoteFrame = CinematicFrameRaidBossEmoteFrame { } LE_GAME_ERR_ONLY_ONE_QUIVER = 36 INT_SPELL_DURATION_HOURS = "%d |4hour:hrs;" SLASH_LibQTip1 = "/qtip" LOSS_OF_CONTROL_DISPLAY_FEAR = "Feared" POWERBAR_PREDICTION_COLOR_MAELSTROM_CODE = "|cff003366" HubPanelSettingsTankScaleIgnoreNeutralUnits = HubPanelSettingsTankScaleIgnoreNeutralUnits { } BankFrameItem17SearchOverlay = BankFrameItem17SearchOverlay { } DMG_LCD = "DMG" ACTION_SPELL_MISSED_POSSESSIVE = "1" SLASH_STOPATTACK1 = "/stopattack" MAP_LEGEND_RARE_TOOLTIP = "A special creature that provides various rewards" MultiCastActionButton4HotKey = MultiCastActionButton4HotKey { } HubPanelSettingsTankWidgetAuraTrackStealable = HubPanelSettingsTankWidgetAuraTrackStealable { } MINIMAP_TRACKING_TRAINER_CLASS = "Class Trainer" SLASH_DISMOUNT2 = "/dismount" DUNGEON_FLOOR_DRAGONBLIGHTCHROMIESCENARIO2 = "Andorhal" DominosActionButton99Icon = DominosActionButton99Icon { } L = HubPanelSettingsGladiatorColorTapped { } EMOTE69_CMD1 = "/nosepick" WowTokenRedemptionFrameBg = WowTokenRedemptionFrameBg { } MinArchRaceButton8 = MinArchRaceButton8 { } SHIELD_BLOCK_TEMPLATE = "%s Block" AutoFollowStatus = AutoFollowStatus { } ARENA_CASUAL = "Skirmish" STABLE_PET_ABILITIES_LIST_HEADER = "Special Abilities" SendStationeryBack

  1. Local (error) - 673

    11x Broker_MicroMenu/Broker_MicroMenu.lua:320: attempt to call method 'RegisterOptions' (a nil value) [string "@Broker_MicroMenu/Broker_MicroMenu.lua"]:320: in function <Broker_MicroMenu/Broker_MicroMenu.lua:319>

Locals: self = Frame { } (temporary) = nil (temporary) =

{ } (*temporary) = "attempt to call method 'RegisterOptions' (a nil value)" dataobj =
{ } frame = Frame { }

  1. Local (error) - 673

2x Broker_MicroMenu/Options.lua:5: attempt to index global 'C_Addons' (a nil value) [string "@Broker_MicroMenu/Options.lua"]:5: in main chunk

Locals: LibStub =

{ minors =
{ } minor = 2 libs =
{ } } addonName = "Broker_MicroMenu" L =
{ Show latency for combat data, data from the people around you (specs, gear, enchants, etc.). = "Show latency for combat data, data from the people around you (specs, gear, enchants, etc.)." Show Home Latency = "Show Home Latency" Show FPS = "Show FPS" Enable this if you want to fine tune the displayed text. = "Enable this if you want to fine tune the displayed text." Show World Latency = "Show World Latency" Custom Text = "Custom Text" Show FPS First = "Show FPS First" fps = "fps" Enable Coloring = "Enable Coloring" Show latency for chat data, auction house stuff some addon data, and various other data. = "Show latency for chat data, auction house stuff some addon data, and various other data." Show frames per second. = "Show frames per second." } Broker_MicroMenu =
{ } (temporary) = nil (temporary) = "Broker_MicroMenu" (temporary) =
{ } (temporary) =
{ attributestorage =
{ } callbacks =
{ } domt =
{ } proxystorage =
{ } namestorage =
{ } } (temporary) = 4 (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (*temporary) = "attempt to index global 'C_Addons' (a nil value)"

AlexFolland commented 1 week ago

To work around this in a simple way locally, add the following to the top of Broker_MicroMenu.lua and Options.lua:

local GetAddOnMetadata = GetAddOnMetadata or (C_AddOns and C_AddOns.GetAddOnMetadata)
local GetNumAddOns = GetNumAddOns or (C_AddOns and C_AddOns.GetNumAddOns)
local IsAddOnLoaded = IsAddOnLoaded or (C_AddOns and C_AddOns.IsAddOnLoaded)
local IsAddOnLoadOnDemand = IsAddOnLoadOnDemand or (C_AddOns and C_AddOns.IsAddOnLoadOnDemand)
local GetAddOnInfo = GetAddOnInfo or (C_AddOns and C_AddOns.GetAddOnInfo)
local GetAddOnDependencies = GetAddOnDependencies or (C_AddOns and C_AddOns.GetAddOnDependencies)