Skip to content

Natives (INIFile)

lp_ edited this page Jul 31, 2022 · 17 revisions

HomeNativesINIFile

❗ The way INI files are handled is like a 'handler' for each file opened inside a script. When opened, the file can stay open and it won't make any trouble. It's designed to stay open for as long as needed. If open, you can write to the file any time.. the ID's begin at 0. When closed, the file can not be written or 'handled' until opened again. But don't panic when you get a warning from the discord API inside the console about a message limit, thats normal for now.


  • Parameters:
    • filepath: The file path of the file to delete.
  • Returns:
    • 1 if file found and deleted. 0 if not.

  • Parameters:
    • filepath: The path to the file.. must be inside '/scriptfiles/'!
  • Returns:
    • The fileid on success, -1 on error.

This function also creates the file if not already.


  • Parameters:
    • fileid: The fileid that has been opened previously.
  • Returns:
    • 1 on success, 0 on failure.

  • Parameters:
    • fileid: The fileid of the opened file.
    • key[]: The key to write data at.
    • data[]: The data to write.
    • section[]: The section to write exactly at.
  • Returns:
    • 1 on success. 0 on failure.

  • Parameters:
    • fileid: The fileid of the opened file.
    • key[]: The key to read data at.
    • section[]: The section where to get the key from.
    • destination[]: The destination to retrieve the data.
  • Returns:
    • 1 on success. 0 on failure.

  • Parameters:
    • fileid: The fileid of the opened file.
    • key[]: The key to write data at.
    • value[]: The integer value to write.
    • section[]: The section to write exactly at.
  • Returns:
    • 1 on success. 0 on failure.

  • Parameters:
    • fileid: The fileid of the opened file.
    • key[]: The key to write data at.
    • section[]: The section to write exactly at.
  • Returns:
    • The value.

  • Parameters:
    • fileid: The fileid of the opened file.
    • key[]: The key to write data at.
    • section[]: The section to write exactly at.
  • Returns:
    • The float value.

  • Parameters:
    • fileid: The fileid of the opened file.
    • key[]: The key to write data at.
    • Float:value: The float value to write.
    • section[]: The section to write exactly at.
  • Returns:
    • True on success, false on failure.

  • Parameters:
    • fileid: The fileid of the opened file.
    • key[]: The key to look for.
    • section[]: The section where to get the key from.
  • Returns:
    • 1 if key found. 0 if not.

  • Parameters:
    • fileid: The fileid of the opened file.
    • key[]: The key to delete.
    • section[]: The section where to delete the key from.
  • Returns:
    • 1 if key found and deleted. 0 if not.

  • Parameters:
    • fileid: The fileid of the opened file.
    • section[]: The section to delete the key from.
  • Returns:
    • 1 if section found and deleted. 0 if not.

  • Parameters:
    • filepath: The file path of the file to look for.
  • Returns:
    • 1 if file found. 0 if not.