lua-users home
lua-l archive

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


I think in Lua 4.x, lua_open() took an arguement specifying the stack size. Maybe he is using example code or documentation from Lua 4.x.

Brian.

Asko Kauppi wrote:


what makes you think lua_open() should have an argument?


20.3.2005 kello 22:40, Wolfgang Bujatti kirjoitti:

 Hi,


I really cannot get my Lua up and running.
Using Dev-C++ (MinGW) with the prepared devpacks of Lua 5.0 and a standard
ANSI C file (have also LuaPlus, but even more errors).

#include <stdio.h>
#include <lua.h>

int main(int argc, char* argv[ ])
{
   lua_State* luaVM = lua_open(0);

   if (NULL == luaVM)
   {
      printf("Error Initializing lua\n");
      return -1;
   }

   // Do stuff with lua code.

   lua_close( luaVM );

   return 0;
}

I get the error: too many arguments in function 'lua open'

Can anyone help me getting this up and running or supply me with a simple
hello world program.

Thanks in advance,
Wolfgang