Closed Matocolotoe closed 5 years ago
They should have the same values. The value is written to both files whenever the game is closed. The game will always be closed for a normal server shutdown/reboot. They are not actively syncronized though.
Are you comparing the amount in the inventory title with the top list, or really the entries in the files?
I'm comparing the amount in the in-game GUIs
The cookie clicker gui will only tell you how many cookies you own at the moment. The top list tells you how many you produced.
So if you produce 15 cookies, then buy a cursor for 10, you own 5, but your highscore is 15.
ikr, but a player had like 30 million cookies, the server rebooted, the top list score and his personal total score had a difference of about 2 million cookies
Two million cookies is not much. There are a lot of updates or buildings that cost a lot more than that. Are you sure that he didn't just buy something? I am not saying, that I am 100% sure that nothing went wrong, but for now, it doesn't sound like it. Were there any errors in the console? Does this happen regularly?
No, it happens when the server reboots while people are playing Cookie Clicker But i'm pretty sure there was a difference between the score in the top list and the personal total amount
If I understood correctly, the top list had the right amount, but the player was missing cookies. The first is done in GameBox, the second in Cookieclicker. So I transferred the issue (also I wanted to test that Beta feature ^^).
I went over the code that should be triggered on a reboot, but couldn't find a problem. Most things that could go wrong should throw an error in the console. You can take a look yourself:
saves.yml
). Also sync because of the shutdown: https://github.com/NiklasEi/cookieclicker-for-gamebox/blob/master/src/main/java/me/nikl/cookieclicker/data/FileDatabase.java#L96When I reboot my server the file is written to.
Sorry, without a stack trace or steps to reproduce I can't do more here.
Are
data.yml
andsaves.yml
synchronized regarding the amount of total cookies per player ? Because when the server reboots and some of the cookies haven't been saved, the total amount of cookies in the top list increases but not for the player