Zockermichi125 Posted January 7, 2022 Share Posted January 7, 2022 Hello everyone, my question is about how can i save data on a server shutdown in C# Serverside? I have read a lot a stuff about this but i haven't found any solution which was for my a solution which i can use in a production envoriment with a lot of players. I tried already the following things: - I saved data based on a timer - Use other events like player disconnected and then i save the data I also tries a lots of things on my own like: - Use the internal delegate (event) for shutting down a application (AppDomain.CurrentDomain.ProcessExit) - Holding Threads to execute code So does anyone have a good solution for this issue? Nothing of my ideas are running so i am very dissatisfied with this topic but in my opion is very important to develop a very stable system. Best Regards Zockermichi125 Link to comment Share on other sites More sharing options...
Addriss Posted February 7, 2022 Share Posted February 7, 2022 Hi, Try caching the data in a database or json file, or .txt (for testing purposes) and when the player logs in, read from the db (or json or .txt) the data that was saved before exiting. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now