Originally Posted by rewt3498
Of course it is. I'm grateful for any help you are able to give whenever!
Edit: I have arrived at a solution thanks to what Rhyono said earlier. I found some information about registering for add on loaded event and combined it with zo_callLater, and I now have a working script. Thanks everyone.
|
zo_callLater is sloppy, should be avoided for this kind of situation if possible.
Now about the AddOnLoaded event, you should ALWAYS wait it to be fired to begin your actual modifications. You can prepare stuff outside, set tables, define functions, but only actually do something after it's triggered. i.e.
Lua Code:
local function DoSomethingCrazy()
-- Here I'm goin nuts!
end
EVENT_MANAGER:RegisterForEvent("BonkersAddOn", EVENT_ADD_ON_LOADED, function(eventCode, addOnName)
if (addOnName == "BonkersAddOn") then
DoSomethingCrazy()
end
end)