[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Problem using lua 5.0
- From: chris@...
- Date: Thu, 06 Nov 2003 14:06:48 +0100
Hi there, I'm trying to reuse/redo a simple C++/LUA wrapper I wrote with Lua 4.0
My first problem is to be able to load and run a test script
I've replaced the old dofile with :
res=luaL_loadfile(m_luaState,fileName.c_str());
// Test res
res=lua_pcall(m_luaState, 0,0,0);
// Test res
The test script is a single line :
io.write("Hello from LUA")
Previously it was
print("Hello from LUA")
Both of them return an error :
attempt to index global `io' (a nil value)
or
attempt to index global `print' (a nil value)
I've tried to find a hint in the manual but may be I've missed it ?
Do I need to include a package to be able to output anything ??
Thanks