Damn Phanx you drive ma crazy. Thanks for all the advices and informations! I guess i can start learning lua in around 1 week. Ill definitly tell you after i'd understand that world of warcraft dev if/elseif example cause for now i dont even get whats wrong with it or how i could get the same result in a other way
.
Ill come back to that bunch of snippeds in the week ill start learning lua and the wow api so ye, for now i just want to tell you that i tryed your addon check / border modification snipped.
Lua Code:
local addonFuncs = {}
addonFuncs["Bagnon"] = function()
hooksecurefunc(Bagnon, "CreateFrame", function(Bagnon, id)
frame:CreateBorder(13,20,20,20, 2)
end)
end
addonFuncs["XLoot_Frame"] = function()
XLootFrame:AddBorder(50,20,20,20, 2)
end
for addon, func in pairs(addonFuncs) do
-- Check for addons that were already loaded before yours:
if IsAddOnLoaded(addon) then
-- Run the function now:
func()
-- Remove it from the queue:
addonFuncs[addon] = nil
else
-- Check for addons that aren't installed or aren't enabled:
local _, _, _, enabled, loadable = GetAddOnInfo(addon)
if not enabled or not loadable then
-- Remove it from the queue:
addonFuncs[addon] = nil
end
end
-- If any addons are still in the queue, listen for addon loading events:
if next(addonFuncs) then
local eventFrame = CreateFrame("Frame")
eventFrame:RegisterEvent("ADDON_LOADED")
eventFrame:SetScript("OnEvent", function(self, event, addon)
local func = addonFuncs[addon]
if func then
func()
addonFuncs[addon] = nil
end
if not next(addonFuncs) then
-- Clean up and send everything to the garbage collector
self:UnregisterEvent(event)
self:SetScript("OnEvent", nil)
addonFuncs = nil
end
end)
end
Since you missed a [/code] at the end of your post i thought there is something missing. the Error code was:
Code:
1x LightboundUI\LightboundUI-v1.0.1.lua:46: "end" expected (to close "for" at line 13) near "<eof>"
I tryed to add some "end" around here and there between the functions of the snipped and /rl. Did result in larger and shorter lua errors
Couldnt manage to fix that. Also tryed to use the XLoot code itself:
Lua Code:
if XLootFrame then
XLootFrame:AddBorder(13,20,20,20, 2)
end
and
Lua Code:
if XLootFrame then
XLootFrame:CreateBorder(13,20,20,20, 2)
end
Also played with the Arguments. Borders wont appear.