WoW:Lua file
WoW AddOn Lua files are the code files for a WoW AddOn. This article describes the format for a WoW Lua file as a part of an WoW AddOn.
References
Summary
.lua files contain the Lua code for a particular addon (such as its functions, variables, etc.), as well as instructions that run while addon is being loaded by the client. The file must be present if listed in the TOC file, and may or may not have the same name (plus extension) as its parent folder for the addon to be recognized by the client.
Example
-- Lua file for MyAddOn function MyAddOn_OnLoad() print("MyAddOn is started") end