diff --git a/drua-tg.lua b/drua-tg.lua index 01e6d31..50e1904 100644 --- a/drua-tg.lua +++ b/drua-tg.lua @@ -56,7 +56,7 @@ drua.send = function(command, do_receive) local output if do_receive then output = string.match(s:receive('*l'), 'ANSWER (%d+)') - output = s:receive(tonumber(n)):gsub('\n$', '') + output = s:receive(tonumber(output)):gsub('\n$', '') end s:close() return output