[Release] auto save function [FIXED!] Fix 

Status
Not open for further replies.
i cant get it to work my file is a bit diffrent maby som1 can fix it would be great!

#include "../Connection/Acceptor.h"
#include "../Connection/Connector.h"
#include "PlayerLogin.h"
#include "Channel.h"
#include "Player.h"
#include "MySQLM.h"
#include <stdlib.h>
#include "Initializing.h"
#include "Timer.h"
#include "Skills.h"
#include "Maps.h"
#include "Server.h"
#include "Channels.h"
#include "MasterServer.h"
#include "PlayersPacket.h"
#include <iostream>

void main(){

Initializing::initializing();
printf("Initializing Timers... ");
Timer::timer = new Timer();
Skills::startTimer();
Maps::startTimer();
printf("DONE\n");
printf("Initializing MySQL... ");
if(MySQL::connectToMySQL())
printf("DONE\n");
else{
printf("FAILED\n");
exit(1);
}
Server::initialize();
WSADATA wsaData;
int iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
if (iResult != NO_ERROR) printf("Error at WSAStartup()\n");

srand((unsigned char)time(0));

Selector* selector = new Selector();
// If LoginServer:
Acceptor::Acceptor(8484, selector, new PlayerLoginFactory());
Acceptor::Acceptor(8585, selector, new ChannelFactory(), true);
Channels::setChannels(2);
// If ChannelServer:
MasterServer* connectMasterServer = new MasterServer("127.0.0.1", 8585);
MasterServer::setChannel(0); // Set this channelid
Acceptor::Acceptor(8888+MasterServer::getChannelID(), selector, new PlayerFactory());
////////////////////

while(getchar()){}
}
 
Status
Not open for further replies.
Back