- Joined
- May 27, 2007
- Messages
- 6,390
- Solutions
- 21
- Reaction score
- 1,481
I fix the problem with lastMotd.txt
Here is path (game.cpp)[change function void Game::loadMotd()]:
Code:void Game::loadMotd() { FILE* file = fopen("lastMotd.txt", "r"); if(file == NULL) { std::cout << "> ERROR: Failed to load lastMotd.txt" << std::endl; lastMotdNum = random_range(5, 500); return; } fscanf(file, "%d", &lastMotdNum); fclose(file); lastMotdText == g_config.getString(ConfigManager::MOTD); }
Now working fine on Linux Debian Etch 4.0 I32.
Check it.![]()
You only caused bugs in the code, now there's no point of saving the lastMotd in the file as you don't load it anyway... and this line has no effect:
lastMotdText == g_config.getString(ConfigManager::MOTD);