Jump to content




fs.writing multiple lines


  • You cannot reply to this topic
2 replies to this topic

#1 cptdeath58

  • Members
  • 139 posts
  • LocationError 404: Could not find.

Posted 28 May 2014 - 04:49 PM

I have problem trying to get the fs.write() to write multiple lines...
I want it to do this
Spoiler

Thank you

#2 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 28 May 2014 - 05:00 PM

You can either add a new-line (\n) character at the end of each line:

file.write("First line\n")
file.write("Second line")

or you could use file.writeLine():

file.writeLine("First line")
file.writeLine("Second line")

Both above examples create exactly the same output. In fact, file.writeLine() is the same file.write() but it just adds a new-line character for you.

#3 cptdeath58

  • Members
  • 139 posts
  • LocationError 404: Could not find.

Posted 28 May 2014 - 05:01 PM

Thanks





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users