Functions within tables

I’m a noob, and I’m sure theres a really simple answer to this but I can seem to find it! If I store list of functions in a table - how do I then run one of those functions from the table - see sample code below…

[lua]myTable = {
func1,
func2
}

local function randomPick()
int1 = math.random (2)
myTable[int1]

end

randomPick()[/lua]

So I’ve defined the functions ‘func1’ and func2’ previously, then stored them in the table, then I’m trying to run a random function from this table with the function randomPick() …however, just writing ‘myTable[int1]’ doesn’t do it

Any help would be appreciated thanks [import]uid: 115035 topic_id: 20010 reply_id: 320010[/import]

[lua]func1 = function()
print(“one”)
end
func2 = function()
print(“two”)
end

myTable = {
func1,
func2
}

local function randomPick()
int1 = math.random (2)
myTableint1

end

randomPick()[/lua]

works fine, you forgot “()” in randompick function [import]uid: 16142 topic_id: 20010 reply_id: 78060[/import]

thank you! I knew it would be something stupid I was doing wrong…! [import]uid: 115035 topic_id: 20010 reply_id: 78062[/import]