This is the issue I get in game:
But the value of it is set to string (when you first join):
When the data is loaded:
When you leave and the data is saved:
The error comes from this line (loading the data):
but theirs never a time when the value isnt set to string, and the error only happens when you join for the first time, which wouldnt be bad but in doing so it resets your data
Im assuming as the error only happens the first time you join and is in the loading section then it isnt setting the value to “unclaimed” which can be seen in the image where the data is loaded though I dont understand why as every other value is loaded correctly if you havent got any data (level set to 1, gold to 50 etc)
The only time it is an issue is if you have data saved before the milestone is added so the probelm with that is that I would never be able to add new milstones to the game post release without it resetting the players data
edit: simply putting the milestone data last in the loading and saving seems to avoid losing the rest of the data but the issue still occurs when first joining