From f1fb95835a39976f653502fdac3022fb6393e1a1 Mon Sep 17 00:00:00 2001 From: Marco Migliori Date: Tue, 16 May 2017 18:46:56 +0200 Subject: [PATCH] display lua hooks errors --- src/scripting/lua/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripting/lua/core.c b/src/scripting/lua/core.c index 00303f9a..6c7e1379 100644 --- a/src/scripting/lua/core.c +++ b/src/scripting/lua/core.c @@ -660,8 +660,10 @@ do_hooks_file(LS, unsigned char *prefix, unsigned char *filename) if (file_can_read(file)) { int oldtop = lua_gettop(S); - if (luaL_dofile(S, file) != 0) + if (luaL_dofile(S, file) != 0) { + printf("%s: %s\n", file, lua_tostring(L, -1)); sleep(3); /* Let some time to see error messages. */ + } lua_settop(S, oldtop); } -- 2.11.4.GIT