Advertisement
ozozx235

print.lua

May 22nd, 2021
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local tArgs={...}
  2. if #tArgs<1 then
  3.     printError("select file")
  4.     return
  5. end
  6. for i=1, #tArgs do
  7.     if fs.exists(tArgs[i]) then
  8.         j=1
  9.         for line in io.lines(tArgs[i]) do
  10.             cond="false"
  11.             if j>16 then
  12.                 os.pullEvent()
  13.                 cond="true"
  14.             end
  15.             print(line)
  16.             j=j+1
  17.         end
  18.     else
  19.     printError("file "..tArgs[i].." not found")
  20.     end
  21. end
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement