[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject:
- From: Stoil Todorov <torpedo_st@...>
- Date: Wed, 17 Dec 2003 09:12:24 -0800 (PST)
Hi ,
I have the problem with load/call Lua code:-(
I follow the next order:
1. luaL_loadbuffer(...)
2. lua_getglobal(m_pLuaState, "read");
3. lua_pcall( m_pLuaState, 0, 0, 0 );
but I receive "A runtime error.: attempt to call a nil
value" - t.e. function "read" is not in Global state,
but I see it is in string, which I loaded...:-(
I load string with this code:
luaL_loadbuffer(m_pLuaState, m_strCode,
m_strCode.GetLength(), (LPCTSTR)m_strCode);
Sorry about this "beginner" question and thank you in
advance...
Stoil
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/