Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual Content: ini_close() and ini_open() pages do not document current behaviours for when errors will be shown #8642

Closed
misternebula opened this issue Dec 9, 2024 · 1 comment
Assignees
Labels
docs-bug GameMaker Manual Bugs
Milestone

Comments

@misternebula
Copy link

Description

ini_open

Docs state:

Please note that you can only have one ini file open at any one time and remember to use ini_close() once you're finished reading/writing from the .ini file

However, it does not mention that calling ini_open() without calling ini_close() will automatically call ini_close() first, as shown in the HTML runner: https://github.com/YoYoGames/GameMaker-HTML5/blob/be30ece4abbde24d6bfc5deb679d9ce3b64f094c/scripts/functions/Function_ini.js#L55-L58
This means the ini file is saved correctly either way.

ini_close

Docs state:

If you try to open an ini without having previously closed another one (or the same one) you will get an error too.

In the HTML runner (and I'm pretty sure the C++ runner, but I will have to double check), ini_close() actually just does nothing when called with no open ini file, and does not throw an error:
https://github.com/YoYoGames/GameMaker-HTML5/blob/be30ece4abbde24d6bfc5deb679d9ce3b64f094c/scripts/functions/Function_ini.js#L83

Manual Link

https://manual.gamemaker.io/beta/en/GameMaker_Language/GML_Reference/File_Handling/Ini_Files/Ini_Files.htm

@misternebula misternebula added the docs-bug GameMaker Manual Bugs label Dec 9, 2024
@YYDan YYDan changed the title Clarify ini_close and ini_open about errors Manual Content: ini_close() and ini_open() pages do not document current behaviours for when errors will be shown Dec 9, 2024
@stuckie stuckie moved this from Triage to Backlog in Team Workload Dec 10, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue Dec 10, 2024
…nt behaviours for when errors will be shown

YoYoGames/GameMaker-Bugs#8642

* Clarified the behaviour of ini_open() and ini_close() on the respective function pages
* Added headers to the INI files page, also moved ini_open_from_string() after ini_open()
* Capitalised "ini" -> "INI", couple of typo fixes
* Visual update of the manual pages
@YYBartT
Copy link

YYBartT commented Dec 10, 2024

Clarified the behaviour of ini_open() and ini_close() and updated the related manual pages a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-bug GameMaker Manual Bugs
Projects
Status: Ready for QA
Development

No branches or pull requests

3 participants