Posted 07 March 2012 - 11:51 AM
Spoiler
total = 0
file = read()
function Clear()
term.clear()
term.setCursorPos(1,1)
end
local h = fs.open(file, "r")
clear()
function Print()
if not line then
if total < 15 then
local line = h:readLine()
print(line)
total = total+1
line = nil
Print()
elseif total == 15 then
sleep(1)
event,param1 = os.pullEvent()
if event == "key" and param1 == 57 then
total = 0
clear()
Print()
end
end
elseif line then
break
end
end
h:close()
When I run this I immediately get "12"
I dont even get to input text