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]