file_text_eoln

Checks to see if the end of the line being read from a text file has been reached.

Syntax:

file_text_eoln(fileid);


Argument Description
fileid The id of the file to check.


Returns: Boolean


Description

With this function you can get GameMaker: Studio 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.


Example:

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.


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