void FileSeekLine(int file, int linenum)
Pass a handle to a file open in read mode, and it will set the current position in the file to the byte after the (linenum) new line is passed. Passing 0 sets the position to the start of the file.
Currently, lines are limited to 256 bytes. Attempting to use FileSeekLine with lines longer than this limit will cause it to position in the middle of lines and produce unexpected results.
int file = FileOpen("readme.txt", FILE_READ); FileSeekLine(file, 12); Log(FileReadLn(file)); FileClose(file); // For the current verge readme this logs: // "http://www.verge-rpg.com/docs/" // Which is line number 13 as count starts at 0
Doc Nav |
Your docs |