Originally Posted by Stijn
After hurting my head on luaL_argcheck in the Lua manual, I found that this function is declared at the top of the file
Just one thing I don't understand, why do you start counting arguments at 2 ?
For example, if you do
Code:
oUF:RegisterStyle("abc","def")
you get
while "def" is argument #2
|
Code:
oUF:RegisterStyle("abc","def")
Is syntactic sugar[1] for:
Code:
oUF.RegisterStyle(oUF, "abc", "def")
In stock Lua we can actually get information about which type you called through the debug library, but we don't have access to that in WoW.
[1] Slightly incorrect to actually call it syntactic sugar, as Lua actually has a optimization for that path.