file_text_writeln(fileid);
Argument | Description |
---|---|
fileid | The id of the file to edit. |
Returns: Real
With this function you can write a new line to an opened text
file. In this way you can skip lines or write information on a line
by line basis (see example code below).
var i, file;
file = file_text_open_write(working_directory +
"\hiscore.txt");
for (i = 0; i < 10; i += 1)
{
file_text_write_real(file, scr[i]);
file_text_writeln(file);
file_text_write_string(file, scr_name[i]);
file_text_writeln(file);
}
file_text_close(file);
The above code opens a file for writing and then loops through two arrays, writing each array value to a new line of the file. The file is then closed when the loop has finished.