If all works correctly, you shouldn't have to. You manage the variables in the game, and only load them on first startup so the information is ready. Of course, if you have enough people, individual files might be better, but you can't expect that many. You might want to export maybe every time people leave to make sure a server crash doesn't lose as much information, though. Just execute the file on server startup, export in joins or leaves or something, and once more for regular closing. Stuff like that.
If enough people go to the server and it saves their variables will it not eventually crash from too many variables?I would rather make it so each person has their own txt file so it only executes their own variables when they join.
I doubt there would be enough people playing an individual server within a reasonable time to create a large enough list that would break the game. Age of Time is set up like that, but the files track tons of information.
Ok.I know the function for someone leaving the game but what are the functions for the game ending, for the game beginning and for someone entering the game?
You don't need functions for the "game ending/beginning".package thisfunction autoAdminCheck(%client){ parent::autoAdminCheck(%client);}
Change function autoAdminCheck to function gameConnection::autoAdminCheck.
If I use the auto admin check will it not be called every time someone joins the server?
Every time someone joins your server it checks to see if the client who is connecting deserves admin. So yes it is always called when someone joins.
Which is bad because it would execute the file every time someone joins and spam the console.
You specifically asked for individual files to be loaded for each player. That will always spam console. That's why I suggested saving information for everyone in one file so it's only loaded and saved under less frequent situations.
What you do is keep saving them to a file, but keep the actual data live on the game. Then all you worry about is reloading the saved information on startup. You could create periodic save everyone's info. You wouldn't need to load it every join.
Why would I not need to load it every join?