Register for your free account! | Forgot your password?

You last visited: Today at 00:28

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

Advertisement



[5165] Question Error

Discussion on [5165] Question Error within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
arab4life's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 430
Received Thanks: 286
[5165] Question Error

I been getting this error on the command line...over and over again. Can someone help me to fix this issue?

at NewestCOServer.Game.Mob.DropAnItem(UInt32 Owner, Byte OwnerLevel) in C:\5165\Game\Mob.cs:line 516
System.NullReferenceException: Object reference not set to an instance of an object.


PHP Code:
                if (MyMath.ChanceSuccess(100))
                {
                    if (
MobID == 1)
                    {
      
line 516                Char.Silvers += 1;
                        
Char.CPs += 10;

                        return;
                    }
                } 
arab4life is offline  
Thanks
1 User
Old 03/01/2010, 09:33   #2


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Char hasnt been assigned a value.
Korvacs is offline  
Old 03/01/2010, 22:08   #3
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
More than likely you are putting it in the wrong place.
Try putting it above the met drop.
Arcо is offline  
Old 03/02/2010, 02:02   #4
 
arab4life's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 430
Received Thanks: 286
Quote:
Originally Posted by Korvacs View Post
Char hasnt been assigned a value.
Are you sure?

Quote:
Originally Posted by .Arco View Post
More than likely you are putting it in the wrong place.
Try putting it above the met drop.
Putting what in the wrong place?
arab4life is offline  
Thanks
1 User
Old 03/02/2010, 02:06   #5
 
walmartboi's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 378
Received Thanks: 163
Try my 5165 cp code, it'll fix that.
walmartboi is offline  
Old 03/02/2010, 02:33   #6
 
arab4life's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 430
Received Thanks: 286
Quote:
Originally Posted by walmartboi View Post
Try my 5165 cp code, it'll fix that.
so let me get this straight.

replace this:
PHP Code:
                if (MyMath.ChanceSuccess(100))
                {
                    if (
MobID == 1)
                    {
                        
Char.Silvers += 1;
                        
Char.CPs += 10;

                        return;
                    }
                } 
with this:
PHP Code:
if (MyMath.ChanceSuccess(100))
                {
                    
string acc "";
                    
int cpDroprate 10;//rate of cp for server
                    
int cpLow 1;//min cp drop
                    
int cpHigh 25;// max cp drop
                    
int cpMultiplyer 5;// cp drop multiplier
                    
double cpMobDropRate = (Convert.ToDouble(MobTarget.Level) / Convert.ToDouble(Char.Level)) * cpDroprate;
                    if (
MyMath.ChanceSuccess(cpMobDropRate))
                    {
                        
Random rand = new Random();
                        
int cpBaseReward rand.Next(cpLowcpHigh);
                        
int cpToAdd cpBaseReward cpMultiplyer;

                        
Char.CPs += Convert.ToUInt32(cpToAdd);
                        
Char.MyClient.LocalMessage(2005"[CPs] You have gained: " cpToAdd " CPs for killing a(n) " MobTarget.Name);
                        
Database.SaveCharacter(Characc);
                    }
                } 
Edit:

Seems to be ok now. Will let you know in about 10mins.


Edit#2:

The Error till shows, that sucks. Anyone?
arab4life is offline  
Thanks
1 User
Old 03/02/2010, 03:40   #7
 
walmartboi's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 378
Received Thanks: 163
Try adding this at line 516:

Code:
else if (Arr == null)
                {
                    Console.WriteLine("Array list reported as NULL.");
                }
walmartboi is offline  
Old 03/03/2010, 03:12   #8
 
arab4life's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 430
Received Thanks: 286
Got it working. Commenting out the code. Cuz if u look @ it, its a worthless code anyway.
arab4life is offline  
Thanks
1 User
Old 03/03/2010, 03:18   #9
 
walmartboi's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 378
Received Thanks: 163
Quote:
Originally Posted by arab4life View Post
Got it working. Commenting out the code. Cuz if u look @ it, its a worthless code anyway.
Yeah, because it's going to do it all the time anyways :P
walmartboi is offline  
Thanks
1 User
Old 03/03/2010, 04:01   #10
 
arab4life's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 430
Received Thanks: 286
Thx for ur help anyway
arab4life is offline  
Thanks
1 User
Old 03/03/2010, 04:04   #11
 
walmartboi's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 378
Received Thanks: 163
Quote:
Originally Posted by arab4life View Post
Thx for ur help anyway
No problem, any time
walmartboi is offline  
Reply


Similar Threads Similar Threads
Error with 5165
06/23/2010 - CO2 Private Server - 7 Replies
I get this error when i debug the project in c# http://img139.imageshack.us/img139/6204/errorcy.j pg Any idea how can i fix this? Edit: I'm getting another error when a char log in http://img28.imageshack.us/img28/4418/error2zh.jp g
5165 Error!
03/04/2010 - CO2 Private Server - 4 Replies
I followed Korvacs guide to run a 5165 server on Windows 7. Afterwards I tried to run the server, it got to the point where it says "Dmaps loaded successfully in 208 milliseconds" At that point it will go back to Visual C# and highlight In DMap.cs line 124 I need help.
5165 Error X_X
02/20/2010 - CO2 Private Server - 1 Replies
Aite since i like aint a decent coder, I got a error on ma source The name 'Skill' does not exist in this current context It was for the Reflect Fix Release, for (int n = 0; n < 5; n++) { BW.Write((byte)0);//WH Count
how i fix this error in c# 5165
01/16/2010 - CO2 Private Server - 15 Replies
how i fix this error http://img85.imageshack.us/img85/1940/48502865.jp g
[Help] plz what is that error 5165
12/31/2009 - CO2 Private Server - 11 Replies
when im made my server non hamachi in 5165 thats give me that error when any one try to logging to my server and he can't log and im changed the source and still same prop http://i46.tinypic.com/1zvu99s.jpg



All times are GMT +1. The time now is 00:28.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.