Ini files

This section deals with ini_file functions.

Ini files are small, lightweight files which are compatible with most platforms. They are ideal for storing small pieces of information, like interface preferences, local high scores, level data etc...

Please note that for games with localizations it is very important that accented letters can be read from external files. This means that you should create the ini file in UTF8 format first and then add it into GameMaker: Studio as an included file so that it is exported on running the game and used instead of the default ANSI format ini file that is created by the ini functions when none has been previously supplied. In this way, you can read and write to it correctly with all accents and non-roman letters being maintained.

The following functions exist for ini files:

  1. ini_open
  2. ini_close
  3. ini_write_real
  4. ini_write_string
  5. ini_read_real
  6. ini_read_string
  7. ini_key_exists
  8. ini_section_exists
  9. ini_key_delete
  10. ini_section_delete
  11. ini_open_from_string

WARNING! These functions may not work as you expect due to GameMaker: Studio being sandboxed! Please see the section on File System Limits for more information.


Back: File Handling
© Copyright YoYo Games Ltd. 2018 All Rights Reserved