Lua: Table of functions
Question
I am trying to store different functions in a table, but somehow it won't work the way I thought it would. Here is my 'code'
fn_table = { aFun1=print, aFun2=self:getSpeedLevel, aFun3=.... }
The problem now is that I can do this with the built in functions like print
, assert
and so on but it wont work with the other functions I've got.
I get the error: "... function arguments expected near '}'
Is it possible to store these function as well?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow