-
Forcing the DB to save
Is there a function that forces the DB to save ?
For example I create a window called "locked_window" and give it a name "newWindow".
I can do that by typing the following command in the chat:
/openwindow locked_window newWindow
If I immediately open the DB.xml file, no trace of "newWindow"
However, if I then type /save in the chat window and reopen the DB.xml, here it is.
Since I plan to basically check if the title of locked_window is empty and if not to copy "newWindow" to a new node, forcing a save of the DB would be helpful. How can I do that ?
-
Fantasy Grounds doesnt read from the db.xml within a session - only at the start of the session.
The rest of the session it works from a copy that is loaded in memory.
This copy is written to disk on exit and every 5mins.
The data that you seek is in the db - it just may not be in the db instance that you can see right now...
type /save to force the write so you can check your code - but the game itself can access it already.
-
Thank you for the info.
I have an additional thing I am struggling with: how can I get a databasenode to delete itself on an OnClose event ?
I have tried getDatabaseNode().delete(); and it crashes utterly fantasy ground.
-