LUA-Script LUA脚本
The following trivial LUA script accepts two parameters: the name of a key and a multiplier value.
下面简单LUA脚本接受两个参数:一个关键的名称和一个乘数的值。
The luaL_loadbuffer() function compiles a script into Lua code; if there is a syntax error, this is where the failure is observed.
luaL_loadbuffer() 函数将一个脚本编译成 Lua 代码。 如果有语法错误,从这里可以观察到失败。
The third, and most flexible, is to mix and match these approaches, using Lua to script some actions, and code in C to manage others.
第三种方式,也是最灵活的方式,是混合上述两种方式,使用 Lua 脚本编写一些动作,而用 C 代码管理其他部分。
应用推荐