Sora Posted January 30, 2013 Posted January 30, 2013 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 [REL] Resource Starter System v1.3 [REL] Give Permissions Panel v1.4 [REL] Meta Creator 1.1 ( In-game MetaCreator ) [REL] ACL Permission Manager 1.0 [REL] Accounts Security Manager 1.1 Name(s) in-game : old |S.s|SoRa, current : *Sora
Castillo Posted January 30, 2013 Posted January 30, 2013 Doesn't "\n" work? local file = fileCreate("file.txt") fileWrite(file,"first line\nsecond line") fileClose(file) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Sora Posted January 30, 2013 Author Posted January 30, 2013 (edited) Doesn't "\n" work? local file = fileCreate("file.txt") fileWrite(file,"first line\nsecond line") fileClose(file) \n work is new line ? i didn't know that , thanks ^^ Edited January 30, 2013 by Guest [REL] Resource Starter System v1.3 [REL] Give Permissions Panel v1.4 [REL] Meta Creator 1.1 ( In-game MetaCreator ) [REL] ACL Permission Manager 1.0 [REL] Accounts Security Manager 1.1 Name(s) in-game : old |S.s|SoRa, current : *Sora
Castillo Posted January 30, 2013 Posted January 30, 2013 Should work, yes. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Sora Posted January 30, 2013 Author Posted January 30, 2013 does not work [REL] Resource Starter System v1.3 [REL] Give Permissions Panel v1.4 [REL] Meta Creator 1.1 ( In-game MetaCreator ) [REL] ACL Permission Manager 1.0 [REL] Accounts Security Manager 1.1 Name(s) in-game : old |S.s|SoRa, current : *Sora
Castillo Posted January 30, 2013 Posted January 30, 2013 What's the problem? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Sora Posted January 30, 2013 Author Posted January 30, 2013 \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) [REL] Resource Starter System v1.3 [REL] Give Permissions Panel v1.4 [REL] Meta Creator 1.1 ( In-game MetaCreator ) [REL] ACL Permission Manager 1.0 [REL] Accounts Security Manager 1.1 Name(s) in-game : old |S.s|SoRa, current : *Sora
uhm Posted January 30, 2013 Posted January 30, 2013 To get it to work in MS Notepad (and anything else), do \r\n instead of just \n 2
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now