Writes a new line to a given opened text file.



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_write_string(file, scr_name[i]);

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.

Back: Text Files
Next: file_text_eoln
© Copyright YoYo Games Ltd. 2018 All Rights Reserved