Untitled
unknown
plain_text
3 years ago
772 B
19
Indexable
public void ClearData()
{
lock (lockObject)
{
Console.WriteLine("Are you sure you want to clear all player data? (y/n)");
string input = Console.ReadLine();
if (input?.ToLower() == "y")
{
// Clear the player data
using (StreamWriter writer = new StreamWriter(filePath))
{
writer.Write(string.Empty);
}
Console.WriteLine("Player data cleared successfully.");
}
else
{
Console.WriteLine("Player data was not cleared.");
}
}
}Editor is loading...