View Single Post
03-10-22, 08:37 AM   #5
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 322


OK, first thing: if you declare a function as "local", it will only be known within its scope, which is at max the current lua file.

So in Tank.lua, declare the function as:

Code:
addonTable.SayHi = function()
    print("Hi")
end

Second thing, your lua files are processed in the order they are stated in the TOC file.
So if you try to execute addonTable.SayHi() before your Tank.lua was processed, the function does not yet exist.
__________________
~ Be the change you want to see in the world... of warcraft interface! ~

Last edited by LudiusMaximus : 03-10-22 at 08:39 AM.
  Reply With Quote