Different way to access table
This commit is contained in:
parent
c5a99e58f0
commit
bf360700d3
10
telnet.lua
10
telnet.lua
@ -26,9 +26,13 @@ function startTelnetServer()
|
|||||||
end)
|
end)
|
||||||
c:on("sent", function()
|
c:on("sent", function()
|
||||||
if (#lines > 0) then
|
if (#lines > 0) then
|
||||||
local localstr = table.remove(lines, 1)
|
l1=nil
|
||||||
print( tostring(localstr) )
|
for k,v in pairs(lines) do if (k==1) then l1=v end end
|
||||||
telnetClient:send(localstr)
|
if (l1 ~= nil) then
|
||||||
|
table.remove(lines, 1)
|
||||||
|
print( tostring(l1) )
|
||||||
|
telnetClient:send(l1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
print("Welcome to the Wordclock.")
|
print("Welcome to the Wordclock.")
|
||||||
|
Loading…
Reference in New Issue
Block a user