lua-users home
lua-l archive

Help

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello,I meet a question:
In C++ Use luaWrapper:
int XX::GetList(lua_State* L)
{
int nCount(0);
for( int i = 1; i < MAX_NUM; ++i)
{
if(m_array[i] == TRUE)
{
lua_pushnumber(L, i)
++nCount;
}
}
return nCount;
}
In lua, How Can I Get This List Elements?
thank!

子辰
2006年07月06日

发件人: Brian Weed
发送时间: 2006年07月03日 23:43:43
收件人: Lua list
抄送:
主题: no calling environment
After recently upgrading to Lua v5.1.1, I am now getting an error when
trying to call luaopen_io (previously known as lua_iolibopen):
luaopen_io- >lua_replace- >lua_G_runerror
lapi.c line 203:
/* explicit test for incompatible code */
if (...)
luaG_runerror(L, "no calling environment")
Can someone tell me why one would get this error? I'm not messing with
environments (not on purpose, anyway).
Brian

AltStyle によって変換されたページ (->オリジナル) /