WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Help with the following error (https://www.wowinterface.com/forums/showthread.php?t=52995)

Meloric 12-24-15 03:07 PM

Help with the following error
 
I recently started playng my monk again and one add-on is now giving me the below error. The add-on is called "ChiEnergyBar. I think I downloaded it from Curse so went there to find it and post this error on the add-on's page burt it is no longer listed. I searched both Curse and here, and neither place has the add-on so I'm guessing it was dropped by the author or removed. I searched for a similar add-on but all that I found either would not work or did not have near the functionality of ChiEnergyBar.

The add-on seems to work fine except for the error that occurs with any port, instance entrance or character leveling. I don't know enough about lua to correct and am hoping someone here can help me fix it.

Here's the BugGrabber output:


BugGrabberDB = {
["session"] = 5708,
["lastSanitation"] = 3,
["errors"] = {
{
["message"] = "Interface\\AddOns\\ChiEnergyBar\\CEBcore.lua:317: Invalid groupIndex parameter! Usage: GetTalentInfo(tier, column, groupIndex [, isInspect, inspectUnit])",
["time"] = "2015/12/23 10:28:02",
["locals"] = "self = CEBCoreFrame {\n 0 = <userdata>\n TimeSinceLastUpdate = 0\n updateInterval = 0.1\n}\nevent = \"PLAYER_TALENT_UPDATE\"\nlocDB = <table> {\n cpOld = 0\n fontSetPoints = <table> {\n }\n border = <table> {\n }\n tBrew = \"Tigereye Brew\"\n inVehicle = false\n cpMax = 4\n texture = <table> {\n }\n ySized = false\n helpText = <table> {\n }\n xSized = false\n font = <table> {\n }\n color = <table> {\n }\n cpUpdate = false\n cpTot = 5\n colPickId = \"Eb\"\n doChiPointsUpdate = true\n inCombat = false\n}\n",
["stack"] = "[C]: in function `GetTalentInfo'\nInterface\\AddOns\\ChiEnergyBar\\CEBcore.lua:317: in function <Interface\\AddOns\\ChiEnergyBar\\CEBcore.lua:182>",
["session"] = 5674,
["counter"] = 9,
}, -- [1]
},
}

Thanks to anyone who can help and I wish everyone Happy Holidays.

Yukyuk 12-24-15 03:50 PM

Post the addon code.
Without the code its almost impossible to see what is wrong.

Fizzlemizz 12-24-15 04:18 PM

The error pretty much says it:

Invalid groupIndex parameter! Usage: GetTalentInfo(tier, column, groupIndex ...

The addon has been marked abandoned http://wow.curseforge.com/addons/chienergybar/

The addon is using an outdated function prototype (GetTalentInfo(8)) that changed in 6.0.2 to GetTalentInfo(tier, column, groupIndex [, isInspect, inspectUnit])

Meloric 12-28-15 11:42 AM

Sorry for the delay in answering, pretty hectic the last week or so with the holidays.

Here's the code for the Local Funcion part of the CEBcore.lua. I bolded and intalicized the error line since line numbers don't show in my cut of the code. The entire lua code is 354 lines. If that is needed I can repost all of it.


Code:

local function RegEventsHandler(self, event, ...)

        if event == "PLAYER_LOGIN" then
                ChiEnergyBar:PlayerLogin()
                ChiEnergyBar.eventHandler:UnregisterEvent("PLAYER_LOGIN")
                ChiEnergyBar.eventHandler:RegisterEvent("PLAYER_TALENT_UPDATE")
                ChiEnergyBar.eventHandler:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
        elseif  event == "PLAYER_REGEN_DISABLED" or event == "PLAYER_REGEN_ENABLED" then
                ChiEnergyBar:UpdateBar()
                if ChiEnergyBarDB.ebEnable then
                        if ChiEnergyBarDB.ebShowOnlyInCombat then
                                if UnitAffectingCombat("player") then
                                        -- in combat
                                        locDB.inCombat = true
                                        EnergyBar:Show()
                                else
                                        -- not in combat
                                        locDB.inCombat = false
                                        EnergyBar:Hide()
                                end
                        end
                end
                if ChiEnergyBarDB.cpEnable then
                        if ChiEnergyBarDB.cpShowOnlyInCombat then
                                if UnitAffectingCombat("player") then
                                        -- in combat
                                        locDB.inCombat = true
                                        ChiPointsBar:Show()
                                else
                                        -- not in combat
                                        locDB.inCombat = false
                                        ChiPointsBar:Hide()
                                end
                        end
                end
                if ChiEnergyBarDB.tbEnable then
                        if ChiEnergyBarDB.tbShowOnlyInCombat then
                                if UnitAffectingCombat("player") then
                                        -- in combat
                                        locDB.inCombat = true
                                        TBBar:Show()
                                else
                                        -- not in combat
                                        locDB.inCombat = false
                                        TBBar:Hide()
                                end
                        end
                end
        elseif event == "UNIT_ENTERED_VEHICLE" then
                ChiEnergyBar.eventHandler:UnregisterEvent("UNIT_ENTERED_VEHICLE")
                ChiEnergyBar.eventHandler:RegisterEvent("UNIT_EXITED_VEHICLE")
                local unit = select(1, ...)
                if unit == "player" then
                        local inVehicle, hasVehicleUI = UnitInVehicle(unit), UnitHasVehicleUI(unit)
                        if inVehicle and hasVehicleUI then
                                EnergyBar:Hide()
                                ChiPointsBar:Hide()
                                TBBar:Hide()
                        end
                end
        elseif event == "UNIT_EXITED_VEHICLE" then
                ChiEnergyBar.eventHandler:UnregisterEvent("UNIT_EXITED_VEHICLE")
                ChiEnergyBar.eventHandler:RegisterEvent("UNIT_ENTERED_VEHICLE")
                ChiEnergyBar:UpdateBar()
                local unit = select(1, ...)
                if unit == "player" then
                        ChiEnergyBar:UpdateBar()
                        if ChiEnergyBarDB.ebEnable then
                                if ChiEnergyBarDB.ebShowOnlyInCombat then
                                        EnergyBar:Hide()
                                else
                                        EnergyBar:Show()
                                end
                        else
                                Energybar:Hide()
                        end
                        if ChiEnergyBarDB.cpEnable then
                                if ChiEnergyBarDB.cpShowOnlyInCombat then
                                        ChiPointsBar:Hide()
                                else
                                        ChiPointsBar:Show()
                                end
                        else
                                ChiPointsBar:Hide()
                        end
                        if ChiEnergyBarDB.tbEnable then
                                if ChiEnergyBarDB.tbShowOnlyInCombat then
                                        TBBar:Hide()
                                else
                                        TBBar:Show()
                                end
                        else
                                TBBar:Show()
                        end
                end
        elseif event == "PET_BATTLE_OPENING_START" then
                ChiEnergyBar.eventHandler:UnregisterEvent("PET_BATTLE_OPENING_START")
                ChiEnergyBar.eventHandler:RegisterEvent("PET_BATTLE_CLOSE")
                EnergyBar:Hide()
                ChiPointsBar:Hide()
                TBBar:Hide()
        elseif event == "PLAYER_ENTERING_WORLD" or event == "PET_BATTLE_CLOSE" then
                if event == "PET_BATTLE_CLOSE" then
                        ChiEnergyBar.eventHandler:UnregisterEvent("PET_BATTLE_CLOSE")
                        ChiEnergyBar.eventHandler:RegisterEvent("PET_BATTLE_OPENING_START")
                end
                ChiEnergyBar:UpdateBar()
                if ChiEnergyBarDB.ebEnable then
                        if ChiEnergyBarDB.ebShowOnlyInCombat then
                                EnergyBar:Hide()
                        else
                                EnergyBar:Show()
                        end
                else
                        EnergyBar:Hide()
                end
                if ChiEnergyBarDB.cpEnable then
                        if ChiEnergyBarDB.cpShowOnlyInCombat then
                                ChiPointsBar:Hide()
                        else
                                ChiPointsBar:Show()
                        end
                else
                        ChiPointsBar:Hide()
                end
                if ChiEnergyBarDB.tbEnable then
                        if ChiEnergyBarDB.tbShowOnlyInCombat then
                                TBBar:Hide()
                        else
                                TBBar:Show()
                        end
                else
                        TBBar:Hide()
                end
        elseif event == "PLAYER_TALENT_UPDATE" or event == "ACTIVE_TALENT_GROUP_CHANGED" then
                local _, _, _, _, _, hasAscension = GetTalentInfo(8)
                if hasAscension then
                        locDB.cpMax = locDB.cpTot
                else
                        locDB.cpMax = locDB.cpTot - 1
                end
                locDB.cpUpdate = true
                locDB.doChiPointsUpdate = true
                ChiEnergyBar:HandleChiPointFrames(locDB.cpMax, true)
                ChiEnergyBar:UpdateBar()
        elseif event == "UNIT_POWER" or event == "UNIT_AURA" then
                local unit = select(1, ...)
                if unit == "player" then
                        ChiEnergyBar:UpdateBar()
                end
        end



All times are GMT -6. The time now is 10:43 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI