AMX Mod X API Documentation

Signature
native read_file(const file[], line, text[], len, &txtlen = 0);
Description

Reads line from file.

Notes
  • This native is expensive. Consider the use of new file natives (fopen(), fgets(), etc.)

    if purpose is to read several lines of a file.

Parameters
  • file Path to open
  • line Index of the line, starting to 0
  • text String buffer to hold line read
  • len Maximum size of string buffer
  • txtlen Number of characters written to the buffer
Returns

Returns index of next line, otherwise 0 when end of file is reached

Errors
  • Unable to read the file
Назад
Верх