Announcement

Collapse
No announcement yet.

Script TextFile.ReadToString Failed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script TextFile.ReadToString Failed

    Hi,
    I have problem with script TextFile.ReadToString when size of file.txt larger than 12 MB.

    I need that script to serach for text in the log file from my router device, but I have a problem when the log file is larger than 12 MB.

    is there a solution?

  • #2
    Try read to table then loop through the table.

    Comment


    • #3
      I've tried read to table but the result is the same, can't read teks file when log file is larger than 12 MB

      Comment


      • #4
        Are you sure? read to table I know works on much larger files, you can use pure Lua though:

        Code:
        local temp = {}
        for line in io.lines("myfile.txt") do
            table.insert(temp, line)
        end

        Comment


        • #5
          Thanks Shrek.. That script is working.
          But I don't know how to do it with my sample project.
          Sample Project : My Project.rar

          Comment

          Working...
          X
          😀
          🥰
          🤢
          😎
          😡
          👍
          👎