View Single Post
04/25/14, 03:52 AM   #10
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Originally Posted by Sharlikran View Post
Lua Code:
  1. EVENT_MANAGER:RegisterForEvent("HarvestMap", EVENT_ADD_ON_LOADED, function (eventCode, addOnName)
  2.     if addOnName == "HarvestMap" then
  3.         Initialize()
  4.         Harvest.OnLoad(eventCode, addOnName)
  5.     end
  6. 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.
  Reply With Quote