diff options
author | Christian Pointner <equinox@anylike.org> | 2010-06-01 18:51:03 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anylike.org> | 2010-06-01 18:51:03 +0000 |
commit | 62bb487400a3c24e98112baca9ca6a06855b95ef (patch) | |
tree | 3790df392a310ffb972a479621f21df6c754d85f | |
parent | mini-fix in debug-shell: return statement now works (diff) |
additional error output at debug shell
-rw-r--r-- | src/debug_shell.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/debug_shell.lua b/src/debug_shell.lua index 005fb9f..a9a9340 100644 --- a/src/debug_shell.lua +++ b/src/debug_shell.lua @@ -134,12 +134,12 @@ debug_shell.exec_cmd = function() local results = { pcall(chunk) } if(results[1]) then for i,result in ipairs(results) do - if(i ~= 1) then - debug_shell.socks[2]:send(string.format("#%d: %s\n", i, tostring(result))) + if(i > 1) then + debug_shell.socks[2]:send(string.format("#%d: %s\n", i-1, tostring(result))) end end else - debug_shell.socks[2]:send("lua call failed\n") + debug_shell.socks[2]:send(string.format("lua call failed: %s\n", tostring(results[2]))) end else debug_shell.socks[2]:send("syntax error\n") |