LuaYard/LuaYard.cpp

24 lines
394 B
C++

#include <iostream>
#include <string>
#include "LuaEngine.h"
using namespace std;
int main()
{
InitEngine();
do {
LuaVM L;
InitLibs(L);
cout << "<ENGINE> Started." << endl;
if (luaL_dofile(L, "code/init.lua"))
{
cout << "<ENGINE FATAL ERROR> " << lua_tostring(L, -1) << endl;
}
else
{
cout << "<ENGINE> Stopped normally." << endl;
}
} while (0);
StopEngine();
}