Weird box at the end of a file reading? [Solved]

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Weird box at the end of a file reading? [Solved]

Post by Kingdaro »

love 2010-08-21 13-42-37-14.png
love 2010-08-21 13-42-37-14.png (42.09 KiB) Viewed 1232 times
What the heck is this weird box that comes after each new line when reading a file?

And how do I get rid if it?
Last edited by Kingdaro on Sat Aug 21, 2010 6:57 pm, edited 1 time in total.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Weird box at the end of a file reading?

Post by bartbes »

I think it's \r.
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: Weird box at the end of a file reading?

Post by Kingdaro »

No...well you just said "I think it's \r" so I assumed that you have to put it after each line, but the boxes are still there. :/
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Weird box at the end of a file reading?

Post by bartbes »

No, I mean that the boxes are probably of character code \r, you could try doing s:gsub("\r\n", "\n") (s being the string) after loading, see if that helps.
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: Weird box at the end of a file reading?

Post by Kingdaro »

Worked, thanks ^^
Post Reply

Who is online

Users browsing this forum: No registered users and 51 guests