- long check = 0;
- long myWins = 0, myGames = 0, myScore = 0;
-
- games = wins = score = 0;
-
- m_config->SetPath("/Players");
- m_config->SetPath(player);
- if (m_config->Read("Score", &myScore, 0L) &&
- m_config->Read("Games", &myGames, 0L) &&
- m_config->Read("Wins", &myWins, 0L) &&
- m_config->Read("Check", &check, 0L))
- {
- if (check != CalcCheck(player, myGames, myWins, myScore))
- {
- wxMessageBox("Score file corrupted", "Warning",
- wxOK | wxICON_EXCLAMATION);
- }
- else
- {
- games = myGames;
- wins = myWins;
- score = myScore;
- }
- }
- WritePlayersScore(player, wins, games, score);
+ long check = 0;
+ long myWins = 0, myGames = 0, myScore = 0;
+
+ games = wins = score = 0;
+
+ m_config->SetPath(wxT("/Players"));
+ m_config->SetPath(player);
+ if (m_config->Read(wxT("Score"), &myScore, 0L) &&
+ m_config->Read(wxT("Games"), &myGames, 0L) &&
+ m_config->Read(wxT("Wins"), &myWins, 0L) &&
+ m_config->Read(wxT("Check"), &check, 0L))
+ {
+ if (check != CalcCheck(player, myGames, myWins, myScore))
+ {
+ wxMessageBox(wxT("Score file corrupted"), wxT("Warning"),
+ wxOK | wxICON_EXCLAMATION);
+ }
+ else
+ {
+ games = myGames;
+ wins = myWins;
+ score = myScore;
+ }
+ }
+ WritePlayersScore(player, wins, games, score);