I have a custom system_save event that fires before shutdown and on my autosave delta time event.
I want to use that event to save a yml file, but said yaml file might not exist. The file is quickly opened and closed after the server boot, and might get opened again if a user uses it. If it's ever opened and editted in this manner, I want to save it using the common system_save custom event.
The thing is, because I'm not sure it exists, I first need to validate it... which I apparently have no way to do ?
All tags error when used on <yaml[foo]> when it isn't loaded: https://paste.denizenscript.com/View/122663
Can't use is_truthy, can't use exists, can't use if_null, and can't use yaml.has_changes.
Also, if I just let Denizen deal with it in case it doesn't exist, it also errors (Error Message: Unknown YAML ID 'foo' )
I also can't "just force it" and open it before saying regardless, because doing so overrides any in-memory change, defeating the whole purpose. (in addition to just being a dumb approach anyways)
How should I handle that ?
Content of Server Log Paste #122663: Unnamed Server Log Paste... pasted 2024/05/12 12:44:43 UTC-07:00, Paste length: 4364 characters across 49 lines, Content: ex narrate <yaml[foo]>[21:43:38 INFO]: DENStarting InstantQueue EXCOMMAND_990_MinusMinecraft.....