lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> So, how do I get a "handle" to function "funcname", having
> it's (string) name? Like:
>
>    handle = get funcion by name ("ent_wall")
>
>    call(handle, args)  -- call global function "ent_wall"

just read it from the globals table: (all global variables are just entries
in that table)

handle = globals()["ent_wall"]

Cheers,
Peter