Posted 21 May 2012 - 02:45 AM
Hello,
I am trying to make a dynamic menu event API, however I need to do one thing: Parse in functions. How do I explain this better….
I've seen somebody declaring it before, so I know it's possible. The main problem is DEFINING the function! What do I put in when defining it? eg.
Thanks,
Math
Solution: it works just as variables. Thanks!
I am trying to make a dynamic menu event API, however I need to do one thing: Parse in functions. How do I explain this better….
function doSomething(keycode)
-- Add some code here
end
someAPI.addOnKeyEvent(doSomething)
I've seen somebody declaring it before, so I know it's possible. The main problem is DEFINING the function! What do I put in when defining it? eg.
function addOnKeyEvent(-[[ What do I put here?]]-)
- Code Here
end
Thanks,
Math
Solution: it works just as variables. Thanks!