Lua: Table of functions
문제
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?
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow