Thread: table behaviour
View Single Post
09/22/20, 07:15 PM   #1
Mipps
Join Date: Sep 2020
Posts: 10
table behaviour

following roughly outlined lua file:

Lua Code:
  1. addonName = {}
  2. addon.name = "..."
  3.  
  4. function addonName:foo()
  5.    ...
  6. end
  7.  
  8. function.OnAddOnLoaded()
  9.    addonName:foo()
  10. end
  11.  
  12. EVENT_MANAGER:RegisterForEvent(addon.name, EVENT_ADD_ON_LOADED, addon.OnAddOnLoaded)

(its a rough downgrade of one of the tutorials from the wiki...)

ingame I get following error message:

"function expected instead of nil"

what I don't understand: In the tutorial it worked but here not?
  Reply With Quote