XLoot

XLoot

5M Downloads

LUA with 11.0.2

Andf opened this issue ยท 9 comments

commented

Hello!

Receiving the following error in 11.0.2

7x XLoot/XLoot.lua:139: attempt to call global 'IsAddOnLoaded' (a nil value)
[string "@XLoot/XLoot.lua"]:139: in function <XLoot/XLoot.lua:136>
[string "=[C]"]: ?
[string "@Bartender4/libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:66: in function <Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:61>
[string "@Bartender4/libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:523: in function EnableAddon' [string "@Bartender4/libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:626: in function <Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:611> [string "=[C]"]: ? [string "=[C]"]: in function LoadAddOn'
[string "@Blizzard_UIParent/Mainline/UIParent.lua"]:422: in function UIParentLoadAddOn' [string "@Rarity/Core/Collections.lua"]:63: in function ScanToys'
[string "@Rarity/Core/Collections.lua"]:282: in function ScanExistingItems' [string "@Rarity/Core.lua"]:178: in function DoEnable'
[string "@Rarity/Core.lua"]:150: in function <Rarity/Core.lua:149>
...
[string "@Blizzard_UIParent/Mainline/UIParent.lua"]:422: in function UIParentLoadAddOn' [string "@Blizzard_UIParent/Mainline/UIParent.lua"]:627: in function MajorFactions_LoadUI'
[string "@Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:103: in function SetUpMajorFactionList' [string "@Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:96: in function RefreshMajorFactionList'
[string "@Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:91: in function RefreshOverlay' [string "@Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:83: in function <...sionLandingPage/Blizzard_DragonflightLandingPage.lua:79> [string "=[C]"]: in function CreateFrame'
[string "@Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:49: in function CreateOverlay' [string "@Blizzard_ExpansionLandingPage/Blizzard_ExpansionLandingPage.lua"]:78: in function RefreshExpansionOverlay'
[string "@Blizzard_ExpansionLandingPage/Blizzard_ExpansionLandingPage.lua"]:37: in function <...pansionLandingPage/Blizzard_ExpansionLandingPage.lua:35>

Locals:
self =

{
modules =
{
}
L_Monitor =
{
}
defaultModuleLibraries =
{
}
opt =
{
}
L_Frame =
{
}
name = "XLoot"
skinners =
{
}
orderedModules =
{
}
baseName = "XLoot"
slash_commands =
{
}
defaultModuleState = true
defaultModulePrototype =
{
}
db =
{
}
Skin =
{
}
enabledState = true
L =
{
}
Stack =
{
}
}
(for state) =
{
1 = "XLoot1.0"
2 = "XLootGroup"
3 = "XLootMaster"
4 = "XLootMonitor"
}
(for control) = 1
_ = 1
name = "XLoot1.0"
(*temporary) = nil
(*temporary) = "XLoot1.0"
(*temporary) = "attempt to call global 'IsAddOnLoaded' (a nil value)"

commented

This is to do with another API change, adding C_AddOns. before the isaddonloaded statement will remove this error, but then error again at line 147 for EnableAddon :(

Still trying to figure that one out...

commented

Thanks for helping! Standing by :)

commented

Thanks for hrelping! Standing by :)

Well, I can get the LUA errors to stop, but can't open options frame without new LUA errors so no idea if it's actually loaded or not ><

I made changes of the lines below to what's shown, LUA errors stopped, no idea if it's right or not...

Lines 53-59
function XLoot:ShowOptionPanel(module)
if not XLootOptions then
C_AddOns.EnableAddOn("XLoot_Options")
C_AddOns.LoadAddOn("XLoot_Options")
end
XLootOptions:OpenPanel(module)
end

lines 136-143
function XLoot:OnEnable()
-- Check for old addons
for _,name in ipairs({ "XLoot1.0", "XLootGroup", "XLootMaster", "XLootMonitor" }) do
if C_AddOns.IsAddOnLoaded(name) then
C_AddOns.DisableAddOn(name)
wprint(("|c2244dd22XLoot|r now includes |c2244dd22%s|r - the old version will be disabled on next load, and no longer needs to be installed."):format(name))
end
end

commented

unfortunately the second section fix didnt make mine to stop the lua errors, and if I just comment out the whole check for old addons section, I am getting a bunch of new lua errors

commented

I've added a temporary download of my LUA file, in case I missed anything above https://filetransfer.io/data-package/eNYVy5vV#link

commented

thanks, in your lua there are also changed this part:

-- Create option stub
if Settings then
	C_AddOns.EnableAddOn("XLoot_Options")
	C_AddOns.LoadAddOn("XLoot_Options")

editing this lines makes the addon works fine
thanks for the fix!

commented

I thought I might have missed something, happy to help!

commented

there's a newish alpha that seems to totally fix it, inc;luding the options menu I couldn't get to work, just FYI :)

commented

Should all be resolved in 11-3.

Thanks for tinkering with it in the meantime.