Skip to content

Global volatile variables #4878

Answered by sovdeeth
ethanrjs asked this question in Suggestions
Discussion options

You must be logged in to vote

This already exists. Check the last section of the config.sk file, there's an explanation on how to enable this there.

PS: If you don't want some variables to be saved in any database (e.g. variables that contain an %entity% which usually despawn when the server is shut down)
you can modify the last database's pattern to not match all variables, e.g. use '(?!x_).*' to match all variables that don't start with 'x_'.
Be very cautious when doing this however as unsaved variables cannot be recovered after the server has been stopped.
I recommend to use a single character to denote unsaved variables (similar to local variables' '_'), e.g. '-', in which case the last database's pattern should …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ethanrjs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants