2012-08-30 24 views

回答

4

In the book.
In the manual.

// lua function that expects a single number argument 
int myfunction(lua_State* L) 
{ 
    double argument = lua_tonumber(L, 1); 
    return 0; 
} 
+0

您还需要启用此功能,以Lua脚本。使用'lua_register'是一种方法。 – lhf

+0

我正在寻找一种方法将函数参数传递给lua_CFunction – Goles

+0

'myfunction(print)'o.O – Mud

相关问题