Error in the Console 5165

07/10/2010 18:53 sohaib#1
hi, i have a co pserver 5165 non-hamachi

i got an error, i can't login , it block in "login to game server"

and take a look at the Console

[Only registered and activated users can see links. Click Here To Register...]

And here is my GameWorker.cs:
PHP Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace 
NewestCOServer.Main
{
    class 
GameWorker
    
{
        public static 
Connection Listener;
        static 
Random Rnd = new Random();

        public static 
void StartServer()
        {
            try
            {
                
Listener = new Connection();
                
Listener.SetConnHandler(new ConnectionArrived(ConnectionHandler));
                
Listener.SetDataHandler(new DataArrived(DataHandler));
                
Listener.SetDCHandler(new Disconnection(DCHandler));
                
Listener.Listen(5816);
            }
            catch (
Exception Exc) { Program.WriteLine(Exc); }
        }
        static 
void ConnectionHandler(StateObj S)
        {
            try
            {
                
GameClient C = new GameClient(false);
                
C.Soc S.Sock;
                
S.Wrapper C;
                
C.AddSend(Packets.DHKeyPacket(C.KeyExchance.PublicKey.ToHexString(), C.NewServerIVC.NewClientIV));
                
C.EndSend();
            }
            catch (
Exception Exc) { Program.WriteLine(Exc); }
        }
        static 
void DataHandler(StateObj StObyte[] Data)
        {
            try
            {
                
GameClient GC = (GameClient)StO.Wrapper;
                
GC.Crypto.Decrypt(Data);

                if (
GC != null)
                {
                    if (
GC.SetBF)
                    {
                        
GC.SetBF false;
                        
MemoryStream MS = new MemoryStream(Data);
                        
BinaryReader BR = new BinaryReader(MS);

                        
BR.ReadBytes(7);
                        
uint PacketLen BR.ReadUInt32();
                        
int JunkLen BR.ReadInt32();
                        
BR.ReadBytes(JunkLen);
                        
int Len BR.ReadInt32();
                        
string PubKey ASCIIEncoding.ASCII.GetString(BR.ReadBytes(Len));

                        
GC.Crypto = new GameCrypto(GC.KeyExchance.ComputeKey(OpenSSL.BigNumber.FromHexString(PubKey)));
                        
GC.Crypto.Blowfish.DecryptIV GC.NewClientIV;
                        
GC.Crypto.Blowfish.EncryptIV GC.NewServerIV;

                        
BR.Close();
                        
MS.Close();
                    }
                    else
                    {
                        
ushort PacketLength BitConverter.ToUInt16(Data0);
                        
ushort PacketID BitConverter.ToUInt16(Data2);

                        if (
PacketID == 1052)
                        {
                            try
                            {
                                
ulong CryptoKey BitConverter.ToUInt64(Data4);

                                
AuthWorker.AuthInfo Info = (AuthWorker.AuthInfo)AuthWorker.KeyedClients[CryptoKey];
                                
GC.AuthInfo Info;
                                
GC.MessageID = (uint)Rnd.Next(50000);
                                
GC.Soc StO.Sock;

                                if (
GC.AuthInfo.LogonType == 2)
                                    
GC.AddSend(Packets.SystemMessage(GC.MessageID"NEW_ROLE"));
                                else if (
GC.AuthInfo.LogonType == 1)
                                {
                                    
string Acc "";

                                    
GC.MyChar Database.LoadCharacter(GC.AuthInfo.Characterref Acc);
                                    try
                                    {
                                        
GC.MyChar.MyClient GC;
                                    }
                                    catch { 
GC.Soc.Disconnect(false); return; }

                                    if (
Game.World.H_Chars.Contains(GC.MyChar.EntityID))
                                    {
                                        
Game.Character Old = (Game.Character)Game.World.H_Chars[GC.MyChar.EntityID];
                                        
Old.MyClient.Disconnect();
                                        if (!
Game.World.H_Chars.Contains(GC.MyChar.EntityID))
                                            
Game.World.H_Chars.Add(GC.MyChar.EntityIDGC.MyChar);
                                        
GC.MyChar Database.LoadCharacter(GC.AuthInfo.Characterref Acc);
                                        
GC.MyChar.MyClient GC;
                                        
GC.AddSend(Packets.SystemMessage(GC.MessageID"ANSWER_OK"));
                                        
GC.AddSend(Packets.CharacterInfo(GC.MyChar));
                                        
GC.AddSend(Packets.Status(GC.MyChar.EntityIDGame.Status.VIPLevelGC.MyChar.VipLevel));
                                        
GC.AddSend(Packets.Time());
                                        
GC.AddSend(Packets.Donators(GC.MyChar));
                                        
GC.AddSend(Packets.Packet1012(GC.MyChar.EntityID));
                                        
GC.AddSend(Packets.Status(GC.MyChar.EntityIDGame.Status.Effect0));
                                    }
                                    else
                                    {
                                        
GC.AddSend(Packets.SystemMessage(GC.MessageID"ANSWER_OK"));
                                        
GC.AddSend(Packets.CharacterInfo(GC.MyChar));
                                        
GC.AddSend(Packets.Status(GC.MyChar.EntityIDGame.Status.VIPLevelGC.MyChar.VipLevel));
                                        
GC.AddSend(Packets.Time());
                                        
GC.AddSend(Packets.Donators(GC.MyChar));
                                        
GC.AddSend(Packets.Packet1012(GC.MyChar.EntityID));
                                        
GC.AddSend(Packets.Status(GC.MyChar.EntityIDGame.Status.Effect0));
                                    }
                                    
Program.WriteLine(GC.MyChar.Name " has logged on.");
                                }
                                
GC.EndSend();
                            }
                            catch { 
GC.Soc.Disconnect(false); }
                        }
                        else 
PacketHandler.Handle(GCData);
                    }
                }
                else
                {
                    
GC.Crypto.Decrypt(Data);
                    
PacketHandler.Handle(GCData);
                }
            }
            catch (
Exception Exc) { Program.WriteLine(Exc); }
        }
        static 
void DCHandler(StateObj StO)
        {
            try
            {
                
GameClient GC = (GameClient)StO.Wrapper;
                if (
GC != null && GC.MyChar != null)
                {
                    
GC.LogOff(true);
                }
            }
            catch (
Exception Exc) { Program.WriteLine(Exc); }
        }
    }


what some one tell me what happened?
07/10/2010 19:24 ryuchetval#2
[Only registered and activated users can see links. Click Here To Register...]
07/10/2010 19:57 sohaib#3
i did, But Same problem, heeeelp

Note, the source is working very well in Windows XP
07/10/2010 22:32 Fish*#4
try set to 32bit (As u already did)
then run as administrator.
07/11/2010 00:02 Zkiller110#5
my computer is the one having trouble hosting the 5165 server i have tried the 32 bit, i have tried running both 32 and 64 bit as administrator and I'm still getting the same error i have tried my IP address with the ports open and i have tried hamachi still no luck could someone help me get the server running through teamviwer

msn: [Only registered and activated users can see links. Click Here To Register...]
07/11/2010 00:53 Fish*#6
try add the gameserver port to ur firewall.
07/11/2010 01:01 Korvacs#7
The link to the 32bit guide is the fix.

Make sure you do everything correctly and hit F6 to build then F5 to debug, dont run from the folder before you have rebuilt it.
07/11/2010 01:53 Zkiller110#8
i would really like to see someone get a 5165 server working on my computer right now i think it is almost impossible even tho 5017 servers start right up
07/11/2010 01:56 MonstersAbroad#9
Give your computer a restart and itl be fine.