Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 02:12

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Impulse 5165 Source Error

Discussion on Impulse 5165 Source Error within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
killerdiggs's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 46
Received Thanks: 1
Impulse 5165 Source Error

I just started back up coding and wanted to work with Impulse's source but when I went to start it up again today i received an error I am not familiar with.

Load the character stats.
System.NullReferenceException: Object reference not set to an instance of an object.
at Conquer_OnlineServer.Program.Main(String[] args) in D:\Entertainment\DropBox\COServer 5165\Conquer_Online_Server\Program.cs: line 46

Any help would be much appreciated.
killerdiggs is offline  
Old 12/09/2017, 23:39   #2
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Quote:
Originally Posted by killerdiggs View Post
I just started back up coding and wanted to work with Impulse's source but when I went to start it up again today i received an error I am not familiar with.

Load the character stats.
System.NullReferenceException: Object reference not set to an instance of an object.
at Conquer_OnlineServer.Program.Main(String[] args) in D:\Entertainment\DropBox\COServer 5165\Conquer_Online_Server\Program.cs: line 46

Any help would be much appreciated.
Well, it's as it says in the error. Null reference. Object was not set.
It even tells you what line it was on... which you were kind enough not to supply us with...
Spirited is offline  
Old 12/12/2017, 04:49   #3
 
killerdiggs's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 46
Received Thanks: 1
using System;
using Conquer_Online_Server.Network;
using Conquer_Online_Server.Database;
using Conquer_Online_Server.Network.AuthPackets;
namespace Conquer_Online_Server
{
class Program
{
public static ServerBase.Counter EntityUID;
public static string GameIP;
public static ushort GamePort;
public static ushort AuthPort;
public static DateTime StartDate;
static void Main(string[] args)
{
try
{
StartDate = DateTime.Now;
Console.Title = "Conquer Online Server Emulator. Start time: " + StartDate.ToString("dd MM yyyy hh:mm");
Console.BackgroundColor = ConsoleColor.Green;
Console.ForegroundColor = ConsoleColor.DarkRed;
Console.WriteLine("-- This source has been writen by Bagu Alexandru. --");
Console.WriteLine("-- Copyright (c) Bagu Alexandru 2008-2010. --");
Console.WriteLine("-- Source created with the help of all mighty God.--");
Console.BackgroundColor = ConsoleColor.Black;
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine("\nLoad server configuration.");
ServerBase.IniFile IniFile = new ServerBase.IniFile("configuration.ini"); IniFile.Read();
GameIP = IniFile.ReadString("Configuration", "IP");
GamePort = IniFile.ReadUInt16("Configuration", "GamePort");
AuthPort = IniFile.ReadUInt16("Configuration", "AuthPort");
Database.ShopFile.Load();
Console.WriteLine("\nInitializing database.");
Database.DMaps.Load();
Database.ConquerItemInformation.LoadInformation();
Database.DataHolder.CreateConnection(IniFile.ReadS tring("MySql", "Username"), IniFile.ReadString("MySql", "Password"), IniFile.ReadString("MySql", "Database"));
Console.WriteLine("\nLoad the character stats.");
Database.DataHolder.ReadStats();
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("conf iguration").Where("Server", ServerBase.Constants.ServerName);
MySqlReader r = new MySqlReader(cmd);
if (r.Read())
{
EntityUID = new ServerBase.Counter(r.ReadUInt32("EntityID"));
Network.GamePackets.ConquerItem.ItemUID = new Conquer_Online_Server.ServerBase.Counter(r.ReadUIn t32("ItemUID"));
}
Line 46 if (EntityUID.Next == 1)
{
Console.WriteLine("Database error. Please check your MySQL. Server will now close.");
Console.ReadLine();
return;
}

that is line 46. Which i why I was confused.
killerdiggs is offline  
Old 12/12/2017, 05:14   #4
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
As it says on page 2 and 3 of that thread, database error. You didn't configure MySQL correctly, and the source isn't written correctly to handle that error, hens the null exception.
Spirited is offline  
Reply


Similar Threads Similar Threads
i got a problem in 5165 impulse source
02/21/2011 - CO2 Private Server - 13 Replies
hi, i have a co pserver 5165 impulse " http://www.elitepvpers.com/forum/co2-pserver-guides -releases/741395-5165-source.html " i followed the guide , but when i made server on i got an error, well i gone to C# and i debugged , and i got the same thing , look: http://img713.imageshack.us/img713/3217/sdfsdft.p ng and "coserver" is the name of database "coserver.sql" there is "coserver" written in OldCODB



All times are GMT +2. The time now is 02:12.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.