I can run a lua script inside scene init function. it produces an error and exit program. How can i run a simple script with cocos2d-x. Thankyou
bool GameLevelLayer::init()
{
int status, result, i;
double sum;
lua_State *L;
L = luaL_newstate();
luaL_openlibs(L);
status = luaL_loadfile(L, "script.lua");
if (status) {
fprintf(stderr, "Couldn't load file: %s\n", lua_tostring(L, -1));
exit(1);
}