summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2020-05-08 17:25:44 +0200
committerAki <please@ignore.pl>2020-05-08 17:26:32 +0200
commit584c443ac4aaad6d735386885ce43d3347b82d0f (patch)
tree4733bd3640f8890c680ed4cb5009c991262e9be3
parenta883cd22cec2d7f9f5318f043bf0062452f7abf4 (diff)
downloadplop-584c443ac4aaad6d735386885ce43d3347b82d0f.zip
plop-584c443ac4aaad6d735386885ce43d3347b82d0f.tar.gz
plop-584c443ac4aaad6d735386885ce43d3347b82d0f.tar.bz2
Changed Lua filename to be an argument
-rw-r--r--plop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plop.c b/plop.c
index 1485aa7..1dff60f 100644
--- a/plop.c
+++ b/plop.c
@@ -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;