Writing numbers in a next file

Hey guys.

I have a question regarding writing data to a text file, specifically numbers.

I have a game where the player is able to get points (score). Whenever he completes a level,
I want this score to be saved in a text file.

I’ve tried the System.IO.File.WriteAllText(“C:/score/score.txt”, score); way, but i cannot take numbers as a parameter.

I also tried to make it so that the score was converted into a string first, by using .ToString, but it still does not work.

Any simple way to do this? :slight_smile:

Thanks!

have you tried PlayerPrefs?

No idea what it is :wink: