diff options
Diffstat (limited to 'src/debug_shell.lua')
-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") |