How to write to the end of the file?
File: write ()
just replaces the text.
Answer 1, Authority 100%
According to documentation , you need open file in Add-on mode.
Example from there:
- Opens a File in Append Mode
File = io.open ("test.lua", "a")
- APPENDS A WORD TEST TO THE LAST LINE OF THE FILE
File: Write ("- Test")
- Closes The Open File
File: Close ()