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