Skip to content

Commit

Permalink
Added warning message if playtime data could not be loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlOfDuty committed Feb 15, 2024
1 parent 1a70dd2 commit 49854b4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion SCPDiscordPlugin/PlayTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,16 @@ public static void Reload()

playtimeData = JsonConvert.DeserializeObject<Dictionary<string, ulong>>(File.ReadAllText(Config.GetPlaytimePath()));
fileWatcher = new Utilities.FileWatcher(Config.GetPlaytimeDir(), "playtime.json", Reload);
Logger.Debug("Successfully loaded '" + Config.GetPlaytimePath() + "'.");

if (playtimeData == null)
{
Logger.Warn("Failed loading '" + Config.GetPlaytimePath() + "'.");
}
else
{
Logger.Debug("Successfully loaded '" + Config.GetPlaytimePath() + "'.");
}

}
}

Expand Down

0 comments on commit 49854b4

Please sign in to comment.