file_text_eoln

With this function you can get GameMaker to check the currently opened file to see if the line being read has finished. The function returns true if the end of the line has been reached and false otherwise.

 

Syntax:

file_text_eoln(fileid);

ArgumentTypeDescription
fileidText File IDThe id of the file to check.

 

Returns:

Boolean

 

Example:

var file = file_text_open_read(working_directory + "Game_Data.txt");
var num = 0; while (!file_text_eoln(file))
{
    score_array[num] = file_text_read_real(file);
    num++;
}
file_text_close(file);

The above code opens a file for reading then reads the values from a single line into an array.