WoW:Lua file

Revision as of 02:19, 3 August 2019 by 89.160.108.132 (talk)

WoW AddOn

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

Guides