Beginner Question: "a,b = ..." At beginning of File
Been looking for an explanation, and I'm a bit stumped! I see something like:
Lua Code:
at the beginning of people's scripts. I guess that WoW passes arguments to the chunk when it loads the file, but I'm not clear what those are and why they are useful. The first argument appears to be the name of the addon, and the second is a table of... something I don't know! :eek: Can anyone explain whats going on here and why its useful? Thanks! |
The table you're referring to is called the Namespace. It's an environment where you can store tons of variables which you can access throughout your addon. Here is a thread with thorough explanations and examples so that I don't have to. :P
|
Quote:
|
All times are GMT -6. The time now is 06:57 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI