Unable to assign property value. string expected, got nil

This is the issue I get in game:
image

But the value of it is set to string (when you first join):
image

When the data is loaded:
image

When you leave and the data is saved:
image

The error comes from this line (loading the data):
image
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

1 Like

Oh sorry, I didn’t read the code properly, you’re right, you don’t need to add the .Value.

3 Likes