diff options
author | Aki <please@ignore.pl> | 2020-05-08 17:25:44 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2020-05-08 17:26:32 +0200 |
commit | 584c443ac4aaad6d735386885ce43d3347b82d0f (patch) | |
tree | 4733bd3640f8890c680ed4cb5009c991262e9be3 | |
parent | a883cd22cec2d7f9f5318f043bf0062452f7abf4 (diff) | |
download | plop-584c443ac4aaad6d735386885ce43d3347b82d0f.zip plop-584c443ac4aaad6d735386885ce43d3347b82d0f.tar.gz plop-584c443ac4aaad6d735386885ce43d3347b82d0f.tar.bz2 |
Changed Lua filename to be an argument
-rw-r--r-- | plop.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -166,14 +166,14 @@ int main(int argc, char ** argv) lua_State * L = luaL_newstate(); luaL_openlibs(L); - if (LUA_OK != luaL_dofile(L, "default.lua")) + if (3 != argc) { - return 2; // TODO: Document error codes/print usage information + return 1; // TODO: Document error codes/print usage information } - if (2 != argc) + if (LUA_OK != luaL_dofile(L, argv[2])) { - return 1; // TODO: Document error codes/print usage information + return 2; // TODO: Document error codes/print usage information } static const int max_clients = 200; |