Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling a Lua string with C

I'm trying to learn how to use Lua with C, so by now I want to try running a script without loading it from a file, since I don't want to be bothered with messing up with files. Can anybody tell me which functions do I need to call for executing a simple string or what ever?


1 Answers

You can use luaL_dostring to execute a script from a string.

If you need help with the basics (creating a Lua state, etc.), read part IV of Programming in Lua.

like image 117
interjay Avatar answered Sep 15 '25 14:09

interjay