function Example:HOLY_COW(arg1, arg2, arg3)
local a = 0
a++
end
<-> Add* key HOLY_COW to table Example, value = function taking three args.
Just like that, in one go. Thass pretty cool.
Not as cool as Python, but still.
* Ehm, supposedly, anyway. I don't really know Lua. But I don't see how that code that I've seen in example addons would work if it doesn't do what I think it does.
tisdag 9 mars 2010
Prenumerera på:
Kommentarer till inlägget (Atom)
Inga kommentarer:
Skicka en kommentar