Register for your free account! | Forgot your password?

You last visited: Today at 15:03

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

 

Impulse 5165 Source Error

Reply
 
Old   #1
 
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   #2
 
elite*gold: 12
Join Date: Jul 2011
Posts: 6,799
Received Thanks: 3,286
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   #3
 
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   #4
 
elite*gold: 12
Join Date: Jul 2011
Posts: 6,799
Received Thanks: 3,286
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



« Previous Thread | Next Thread »

Similar Threads
i got a problem in 5165 impulse source
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...
13 Replies - CO2 PServer - Discussions / Questions



All times are GMT +2. The time now is 15:03.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.