Jump to content

write in the next line


Sora

Recommended Posts

hi , while i'm using fileWrite , i tried to go to the next line using

fileSetPos(file,fileGetPos(file)+110) 

but it just makes some spaces , how can i go to the next line ?

i want to do something like

local file = fileCreate("file.txt") 
fileWrite(file,"first line") 
goToNextLine(file) 
fileWrite(file,"second line") 
fileClose(file) 

file.txt

first line 
second line 

Link to comment

\n only works with notepad or scite but not with ms-notepad because the file opened using ms-notepad by default and it shows me first linesecond line

in notepad++ or scite ( lua editors )

first line

second line

thanks Solidsnake(castillo)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...