Scripts / Some Lua-related question?

Author
Message
gaussmake1994
9
Years of Service
User Offline
Joined: 25th Jul 2015
Location:
Posted: 25th Jul 2015 21:37
I need to use dynamically changing set of functions that must be called at "script_main(e)"
So I used next structure:



But if I trying next :

I can see that type(func)=="nil", where func must be UIMode.show function.
When I trying to use same code in Lua 5.2 console (with defining

)
I getting type(func)=="function".
What I'm doing wrong?
gaussmake1994
9
Years of Service
User Offline
Joined: 25th Jul 2015
Location:
Posted: 25th Jul 2015 21:47 Edited at: 25th Jul 2015 22:15
Sorry, it's wasn't Lua-related error, it's my code structure-related error.
My code iterated xrServiceFunctions and called xrServiceFunctions.attach :

Yes, it's called xrServiceFunctions.attach as item of xrServiceFunctions table.

Login to post a reply

Server time is: 2024-12-21 19:00:11
Your offset time is: 2024-12-21 19:00:11