Hello, I need help with auto server, with this code
getting error:
and
can you help me?
PHP:
void Game::saveServer()
{
std::cout << ":: Saving the server... ";
for(AutoList<Player>::listiterator it = Player::listPlayer.list.begin(); it != Player::listPlayer.list.end(); ++it){
(it->second)->loginPosition = (it->second)->getPosition();
IOPlayer::instance()->savePlayer(it->second);
}
if(map->saveMap(""))
std::cout << "[done]" << std::endl;
else
std::cout << "[failure]" << std::endl;
}
void Game::autoServerSave()
{
saveServer();
addEvent(makeTask(g_config.getNumber(ConfigManager::SERVER_SAVE)*60000, std::mem_fun(&Game::autoServerSave)));
}
getting error:
PHP:
'class Game' has no member names 'addEvent'
and
PHP:
'makeTask' was not declared in this scope
can you help me?