Lua - Execute a Function Stored in a Table
问题 I was able to store functions into a table. But now I have no idea of how to invoke them. The final table will have about 100 calls, so if possible, I'd like to invoke them as if in a foreach loop. Thanks! Here is how the table was defined: game_level_hints = game_level_hints or {} game_level_hints.levels = {} game_level_hints.levels["level0"] = function() return { [on_scene("scene0")] = { talk("hint0"), talk("hint1"), talk("hint2") }, [on_scene("scene1")] = { talk("hint0"), talk("hint1"),