Jump to content




New line while writing in other file.


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

#1 I_IblackI_I

  • Members
  • 7 posts

Posted 13 February 2013 - 08:29 AM

Title: New line while writing in other file.
Hello i'm making a code that writes in another file and after alot of searching i made this
i = 16
file = fs.open("startup", "w")
file.write("shell.run(\"power\" i")
(((This is the place where I need a code to go to the next line in the file)))
file.write("print(\"hi\")")
file.close()
Hope you can help!

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 13 February 2013 - 08:39 AM

file.write([[shell.run("power")]].."\n")

The [[ ]] are block quotes, and do not require or accept escaping inside them. The \n is the newline character.

#3 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 13 February 2013 - 09:04 AM

or use file.writeLine('')





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users