Register for your free account! | Forgot your password?

You last visited: Today at 04:07

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

Advertisement



[Help] 5095 Error(s)

Discussion on [Help] 5095 Error(s) within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
[Help] 5095 Error(s)

I am still developing the Elite-CoEmu source because I want to use it as a base source and continue from there, but ofc I run into some errors when the world server is executed:

Code:
== Welcome to Elite-CoEmu v5095 ==
== This Program is for Non Profitable and Entertainment Purposes Only ==
[WorldServer] Starting to Initialize
System.NullReferenceException: Object reference not set to an instance of an object.
   at MySqlHandler.MySqlReader.Read()
   at WorldServer.Database.LoadMaps() in C:\Users\LaZaRo\Desktop\Elite Co-Emu\trunk\WorldServer\Database\Database.cs:line 938
[WorldServer] Loaded 0 Maps in 733ms
System.NullReferenceException: Object reference not set to an instance of an object.
   at MySqlHandler.MySqlReader.Read()
   at WorldServer.Database.LoadDynamicMaps() in C:\Users\LaZaRo\Desktop\Elite Co-Emu\trunk\WorldServer\Database\Database.cs:line 964
   at WorldServer.Initialize.LoadMaps() in C:\Users\LaZaRo\Desktop\Elite Co-Emu\trunk\WorldServer\Initialize.cs:line 28
   at WorldServer.World.StartServer() in C:\Users\LaZaRo\Desktop\Elite Co-Emu\trunk\WorldServer\World.cs:line 151
Database.cs line 938:
Code:
public static void LoadMaps()
        {
            try
            {
                MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT);
                cmd.Select("maps");
                MySqlReader r = new MySqlReader(cmd);
                [COLOR="Red"]while (r.Read())[/COLOR] <<<<<
                {
                    int MapID = r.ReadInt32("MapID");
                    string MapFile = r.ReadString("MapFile");
                    int NonPk = r.ReadInt32("NonPK");
                    int NonScroll = r.ReadInt32("NonScrollable");

                    if(NonPk == 1)
                        if (!World.NonPkMaps.Contains(MapID))
                            World.NonPkMaps.Add(MapID);
                    if(NonScroll == 1)
                        if (!World.NonScrollMaps.Contains(MapID))
                            World.NonScrollMaps.Add(MapID);

                    PICMaps map = new PICMaps("map\\pmaps\\" + MapFile, MapID);
                    PICMaps.PMaps.Add(MapID, map);
                    Program.WriteLine("[WorldServer] Loaded PMap " + MapID + "");
                }
            }
            catch (Exception EXC) { Program.WriteLine(EXC); }
        }
Database.cs line 964:
Code:
public static void LoadDynamicMaps()
        {
            MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT);
            cmd.Select("maps_dynamic");
            MySqlReader r = new MySqlReader(cmd);
            [COLOR="red"]while (r.Read())[/COLOR] <<<<<
            {
                int mapId = r.ReadInt32("MapID");
                string pmapfile = r.ReadString("MapFile");
                int type = r.ReadInt32("Type");

                DynaMap DM = new DynaMap();
                DM.MapID = mapId;
                DM.Type = type;
                PICMaps.DynamicMaps.Add(DM.MapID, DM);
                PICMaps map = new PICMaps("map\\pmaps\\" + pmapfile, mapId);
                PICMaps.PMaps.Add(mapId, map);

                Program.WriteLine("[WorldServer] Loaded Dynamic PMap " + mapId + "");
            }
        }
Initialize.cs line 28:
Code:
Database.LoadDynamicMaps();
World.cs line 151:
Code:
Initialize.LoadMaps();
If I could get any sort of help with these errors I would so much appreciate it.

Regards, killersub.
killersub is offline  
Old 12/11/2011, 19:09   #2
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Exactly lines that's throwing the exception in the method?

Otherwise I can't exactly tell what's causing it, other than it's an object that you are trying to use, which has not yet been created.
BaussHacker is offline  
Old 12/11/2011, 19:31   #3
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by BaussHacker View Post
Exactly lines that's throwing the exception in the method?

Otherwise I can't exactly tell what's causing it, other than it's an object that you are trying to use, which has not yet been created.
the lines throwing the error are in "red" and pointed out in "<<<<<".

I have not touched the source If you're asking.
killersub is offline  
Old 12/11/2011, 19:48   #4
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
You probably don't have the pmaps extracted into the output bin
OR You probably don't have the table in your sql. That source can barely be used anymore.
Spirited is offline  
Old 12/11/2011, 22:59   #5
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by Fаng View Post
You probably don't have the pmaps extracted into the output bin
OR You probably don't have the table in your sql. That source can barely be used anymore.
what do you mean it can be barely used anymore?
killersub is offline  
Old 12/11/2011, 23:27   #6
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Quote:
Originally Posted by killersub View Post
what do you mean it can be barely used anymore?
None of the required files are on any of the latest svn versions.
pro4never is offline  
Old 12/12/2011, 02:40   #7
 
{ Angelius }'s Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 991
Received Thanks: 1,107
last time i looked Elite-CoEmu contained an empty load maps void, which means you are trying to create one.

so chances are..
1. wrong table name

2. a null MySqlDataAdapter

3. a Silent Exception

the tryFill void from the CoEmu MySqlHandler.dll
Quote:
private void TryFill(MySqlCommand command)
{
using (MySqlConnection mySqlConnection = new MySqlConnection(MySqlArgument.op_Implicit(Connecti ons.Argument)))
{
mySqlConnection.Open();
MySqlDataAdapter mySqlDataAdapter = null;
if (mySqlConnection.State == 1)
{
mySqlDataAdapter = new MySqlDataAdapter(command.Command, mySqlConnection);
this._dataset = new DataSet();
try
{
mySqlDataAdapter.Fill(this._dataset, "table");
}
catch (Exception)
{
}
this._row = 0;
}
}
}
i'm just guessing here so one of your options here is it to extract the MySqlHandler.dll,
and use the source code, you can then break point where ever you want and follow the error.


note: if the mySqlConnection.State does not = 1 then the mysqlreader._dataset will = null and when you call the Reader.Read void from out side the .dll you'll see the same Exception Message that you posted up there
{ Angelius } is offline  
Old 12/13/2011, 00:10   #8
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by pro4never View Post
None of the required files are on any of the latest svn versions.
Quote:
Originally Posted by { Angelius } View Post
last time i looked Elite-CoEmu contained an empty load maps void, which means you are trying to create one.

so chances are..
1. wrong table name

2. a null MySqlDataAdapter

3. a Silent Exception

the tryFill void from the CoEmu MySqlHandler.dll


i'm just guessing here so one of your options here is it to extract the MySqlHandler.dll,
and use the source code, you can then break point where ever you want and follow the error.


note: if the mySqlConnection.State does not = 1 then the mysqlreader._dataset will = null and when you call the Reader.Read void from out side the .dll you'll see the same Exception Message that you posted up there
thank you both for your responses. that is all I needed to know for now (:.

#request close
killersub is offline  
Reply


Similar Threads Similar Threads
{HELP} Annoying 5095 Error!
11/08/2010 - CO2 Private Server - 0 Replies
okay so this error is starting to piss me off(I have barely modified the source and this already starts to happen...) since I cannot start the server because of it...it is the all-known error: The type initializer for 'CoEmu_v2_GameServer.Nano' threw an exception. And I highly doubt that it's the startserver void thats causing da problem... I really would love some help on this error since I can't seem to find good help around lately :S...I don't think u can modify a 5095 source...
5095 sorce error
10/25/2010 - CO2 Private Server - 3 Replies
i have the zf server pack for 5095 how do i make my user name test and password test because when i start up winmysqladmin it dosent tell me to start inset username and pass And Another Problem When I Run Msgserver and npcserver it says "database open failed.db server:127.0.0.1, user=test psw=test, db_name:cq, db port:3306." Who knows why And When I Run CoAccountServer It Says This "Unable to find a version of the runtime to run this application" AT THE TOP IT SAYS .NET FRAMEWORK...
[Help]5095 error
03/03/2010 - CO2 Private Server - 3 Replies
is there anyway to host a server without a static ip or using hamachi
[help]5095 error
02/05/2010 - CO2 Private Server - 1 Replies
every time i login it just says: after a few minutes it disconnects me can anyone help please
[HELP] Error on 5095
05/28/2009 - CO2 Private Server - 4 Replies
Ok our login server starts fine and then when we start the game server it loads ok to the lastpart then it messes up here is the error http://img12.imageshack.us/img12/8310/errorcms.pn g



All times are GMT +2. The time now is 04:07.


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.