Windows luaplayer /n newline issue?

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
SeparateEntity
Posts: 3
Joined: Thu Feb 09, 2006 5:30 am

Windows luaplayer /n newline issue?

Post by SeparateEntity »

When I use this code:

Code: Select all

green = Color.new(0, 255, 0)
screen:print(0,0, "Hello World\nby Entity", green)
screen.flip()
while true do
	screen.waitVblankStart()
end
I end up with Hello World[weirdcharacter]by Entity. Is this an issue in Winluaplayer, or does it affect the PSP version as well?

I have a 2.6 PSP, so I can't test it myself.
LuMo
Posts: 410
Joined: Sun Aug 21, 2005 2:45 am
Location: Austria
Contact:

Post by LuMo »

possibly cause \n is not implemented in the windows version?

greets
lumo
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
fullerlee
Posts: 54
Joined: Thu Nov 03, 2005 9:46 am

Post by fullerlee »

I generally only test on windows luaplayer, so I'm not sure about on PSP.

I don't use any newlines, if I have multiple lines, I increment the y pos by 8 (the height of the bitmap font) and do multiple prints.

Code: Select all

screen:print(0,0, "Hello World", green)
screen:print(0,8, "by Entity", green)
Lee
SeparateEntity
Posts: 3
Joined: Thu Feb 09, 2006 5:30 am

Post by SeparateEntity »

I'm working on a simple brainf*** editor/interpreter. I'll need to split the BF code (the main string) to multiple lines. It would be much easier if it could support \n without having to code an inefficient and lengthy workaround.
Post Reply