C++中获取当前LUA堆栈信息
LuaPlus::LuaState* pState = ScriptManager::Instance().GetState(); if(pState) { lua_getglobal(pState->GetCState(), "debug"); lua_getfield(pState->GetCState(), -1, "traceback"); int iError = lua_pcall(pState->GetCState(), 0, 1, 0); const char* sz = lua_tostring(pState->GetCState(), -1); MessageBox(NULL, sz, "", MB_OK); }
发布: 2018/6/27 分类: 开发之路 阅读: 次 评论: 0次