Jump to content

String contents as function


Maggi

Recommended Posts

Hi community!

While creating mission engine i've discovered a question:

script generates lua script and put generated script in the string. How can I run generated script? (as function call, of course)

ex: my_lua_fn_string = "function myGeneratedCodeFn() ....some lua code here.... end"

my purpose is to call myGeneratedCodeFn function as callback somewhere from gamemode script.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...