3,425
社区成员
发帖
与我相关
我的任务
分享
void registluack()
{
//L = lua_open();
//luaopen_base(L);
//lua_register(L,"输出调试信息",luaprint);
L = luaL_newstate();
luaL_openlibs(L);
if (L!=NULL)
{
OutputDebugString("获取指针");
}
else{
OutputDebugString("获取指针失败");
}
int testlua= luaL_dofile(L,"D:\\test.txt"); //这里返回了1 搞了一天了 实在搞不懂
char str[10];
sprintf(str,"%d",testlua);
//MessageBox(0,str,"",0);
OutputDebugString(str);
// lua_dofile();
lua_register(L,"输出调试信息",luaprint);
OutputDebugString("脚本初始化成功!");
lua_close(L);
}