Lua Code:
function Initialize()
defaultValues = {
["account"] = false,
["verbose"] = false,
["debug"] = false,
}
Harvest.settings = defaultValues
end
EVENT_MANAGER:RegisterForEvent("HarvestMap", EVENT_ADD_ON_LOADED, function (eventCode, addOnName)
if addOnName == "HarvestMap" then
Initialize()
Harvest.OnLoad(eventCode, addOnName)
end
end)
Wait, that worked!
So is it
EVENT_MANAGER:RegisterForEvent("HarvestMap", EVENT_ADD_ON_LOADED, function (eventCode, addOnName)
OR
EVENT_MANAGER:RegisterForEvent("HarvestMap", EVENT_ADD_ON_LOADED, function Harvest.OnLoad(eventCode, addOnName)
OR
EVENT_MANAGER:RegisterForEvent("HarvestMap", EVENT_ADD_ON_LOADED, function OnLoad(eventCode, addOnName)
Some of those gave me errors about an "(" expected near "Harvest...