GM: file text read string

From GMpedia.org Wiki

Jump to: navigation, search
The correct title of this article is file_text_read_string(fileid). It appears incorrectly here because of technical restrictions.
The correct title of this article is file_text_read_string(). It appears incorrectly here because of technical restrictions.


Arguments

fileid = the id of the file returned by file_text_open_read

Limitations

none

Note: Please remove limitations and port them in the "Remarks" section at the end of the article.

Reads 1 line from the file and returns the string. The value can be any alphanumerical character.

[edit] Example

read = file_text_read_string(file1);

The example above will read the contents of the file up until the first linefeed and return it as a string that will be stored in the variable 'read'.

This article was originally found at the Game Maker Knowledge Base, contributed by Ari.
See the talk page for details
Personal tools