• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling Auto server save for avesta 7.6

henqqq

New Member
Joined
Nov 22, 2008
Messages
4
Reaction score
0
Hello, I need help with auto server, with this code

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?
 
Back
Top