Zmiana Lua5.0 na 5.2 Error

0

witam, mam mały problem przy przenoszeniu się z lua5.0 na lua 5.2
wywala różne błędy typu

 'lua_open' was not declared in this scope
 
 'lua_strlen' was not declared in this scope
 

wie ktoś czemu? wiem ze tego NIE MA w wersji lua 5.2 ale na jaką mam zmienić nazwe zeby też działało?

1

zamiast lua_strlen uzyj lua_objlen
a zamiast lua_open uzyj lua_newstate

0
fasadin napisał(a):

zamiast lua_strlen uzyj lua_objlen
a zamiast lua_open uzyj lua_newstate

nie dało rady

 error: too few arguments to function 'lua_State* lua_newstate(lua_Alloc, void*)'
 
/usr/include/lua5.2/lua.h:126:21: note: declared here
 
 error: 'lua_objlen' was not declared in this scope
 

tak mam w c++

int32_t LuaScript::OpenFile(const char *filename)
{
	luaState = lua_newstate();
	if(luaL_dofile(luaState, filename))
		return false; 

w .h

 extern "C"
{
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
}

extern "C" struct lua_State;

1 użytkowników online, w tym zalogowanych: 0, gości: 1