How can i show new lines with file i/o? I am using the script:
highscoreFile = "1.txt"
function loadHighscore()
file = io.open(highscoreFile, "r")
if file then
high = file:read()
file:close()
end
end
when I edit the highscoreFile to:
asdf
adf
adfjkald
I get jkdsf then a musical note to appear. How can i get
asdf
adf
adfjkald
to appear?
file i/o NOOB here
Moderators: Shine, Insert_witty_name
file i/o NOOB here
Last edited by darklitch on Sun Nov 06, 2005 2:49 am, edited 1 time in total.
It does. The options do.
I've created my own parody of Lua called LUAH. Of course, it runs in luaplayer, you edit a file called index.LUAH. It has the commands: clearscreen(color), display(text), refreshscreen(), wait(time in milliseconds), wait(start) [wait till start is pushed], while not start end, and /LUA/ followed by a LUA command. It works by analizing each line, then writes to a new Luaplayer file called 'luah.luah. It then runs it.
It should look something like: (well, not exaclty, I forgot the open commad)
file = ioopen("file", "*r")
for line in file:lines() do
end
I've created my own parody of Lua called LUAH. Of course, it runs in luaplayer, you edit a file called index.LUAH. It has the commands: clearscreen(color), display(text), refreshscreen(), wait(time in milliseconds), wait(start) [wait till start is pushed], while not start end, and /LUA/ followed by a LUA command. It works by analizing each line, then writes to a new Luaplayer file called 'luah.luah. It then runs it.
It should look something like: (well, not exaclty, I forgot the open commad)
file = ioopen("file", "*r")
for line in file:lines() do
end