AliasCage / Match3inLine

Console game match 3 in line
0 stars 0 forks source link

match3inline #1

Open makstag opened 3 years ago

makstag commented 3 years ago

Доброго времени суток, подскажите пожалуйста возможно ли на ++ запустить App.lua, сколько бы я не пытался постоянно выводит сообщение "...программа не работает"?

pragma comment(lib, "lua54.lib")

extern "C" {

include "lua.h"

include "lauxlib.h"

include "lualib.h"

}

include // надо для _getch()

int main(int argc, char argv[]) { lua_State L = luaL_newstate(); luaL_openlibs(L);//подключить стандартные библиотеки lua_newtable(L);

int status = luaL_dofile(L, "App.lua");//загрузить файл
/* Состояние стeка:
    [-1]main <--top of the stack
 */
if (status)
{
    (void)fprintf(stderr, "file not found\n");
    return 1;
}
lua_pcall(L, 0, 0, 0);
lua_close(L);
_getch();
return 0;

}

AliasCage commented 3 years ago

@MSTitov Доброго! К сожалению помочь не смогу, с плюсами знаком слегка