Originally Posted by Sharlikran
Lua Code:
EVENT_MANAGER:RegisterForEvent("HarvestMap", EVENT_ADD_ON_LOADED, function (eventCode, addOnName) if addOnName == "HarvestMap" then Initialize() Harvest.OnLoad(eventCode, addOnName) end end)
|
Anonymous functions will just make your debugging life harder, because if you have an error in that part of the code, the backtrace won't tell you where it happened.