I'm trying to write out to a text file and want to create a new line. I found this thread, but its too old to reply. I think I must have tried every combination of Chr(10) and/or Chr(13) with both WriteString and WriteLine, but it doesn't seem to work for me...
http://forum.thegamecreators.com/?m=forum_view&t=199017&b=41
I can get a new line, but for some reason this causes a 'Space' to be added after each character.
Here's my temp code:
SetVirtualResolution(480, 320)
SetSyncRate(60, 0)
SetPrintColor(0, 0, 0)
SetClearColor(255, 255, 255)
global File
if GetFileExists("Temp.txt")
DeleteFile("Temp.txt")
endif
File = OpenToWrite("Temp.txt")
do
if GetRawKeyPressed(38) = 1
Print("Up")
WriteString(File, "U")
elseif GetRawKeyPressed(40) = 1
Print("Down")
WriteString(File, "D")
elseif GetRawKeyPressed(37) = 1
Print("Left")
WriteString(File, "L")
elseif GetRawKeyPressed(39) = 1
Print("Right")
WriteString(File, "R")
endif
if GetRawKeyPressed(27) = 1 // Esc Key
Print("New Line")
//WriteString(File, Chr(13) + Chr(10))
WriteLine(File, "")
endif
Sync()
loop
Where am I going wrong?