diff --git a/DoomDeathmatch/src/Script/Score/ScoreTable.cs b/DoomDeathmatch/src/Script/Score/ScoreTable.cs index 58e9e50..c66c61c 100644 --- a/DoomDeathmatch/src/Script/Score/ScoreTable.cs +++ b/DoomDeathmatch/src/Script/Score/ScoreTable.cs @@ -38,6 +38,12 @@ public class ScoreTable public static void Save(ScoreTable parTable, string parPath) { + var directory = Path.GetDirectoryName(parPath); + if (directory != null && !Directory.Exists(directory)) + { + Directory.CreateDirectory(directory); + } + using var stream = File.Create(parPath); JsonSerializer.Serialize(stream, parTable, OPTIONS); }