Posted 26 September 2012 - 09:31 PM
I want to use the functions I located in my table. How do I do that?
local function f1()
print("Hello world!")
end
local function f2(name)
print("Hello, "..name.."!")
end
local myFunctionTable= {
f1=f1,
f2=f2,
}
myFunctionTable.f1()
myFunctionTable.f2("bob")
key=read()
myFunctionTable[key]()