Register for your free account! | Forgot your password?

You last visited: Today at 20:31

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

Advertisement



FB/SS Exeption

Discussion on FB/SS Exeption within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
C#Storm's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 146
Received Thanks: 57
FB/SS Exeption

Hi , i saw that Pro4Never2 is getting same error as me, but i'm gonna ask help with a different way.

Here's Exeption , it happens when i try to hit a player with fastblade or SS(not sure exactly when it happens)

Quote:
System.NullReferenceException: Object reference not set to an instance of an object.
to COEmulator.Features.SkillsClass.SkillUse.GetMobTar gets (UInt32 Single) in
C: \ COEmulator \ Features \ skills.ca: line 232
to COEmulator.Features.SkillsClass.SkillUse.GetTarget s (UInt32 Single) in
C: \COEmulator \ Features \ skills.ca: line 147
this is the void of GetMobTargets

PHP Code:
 void GetMobTargets(uint Single)
            {
                if (
Info.ExtraEff == ExtraEffect.Ride || Info.ExtraEff == ExtraEffect.UnMount) return;
                if (
Info.Targetting == TargetType.Single)
                {
                    if (
World.H_Mobs.Contains(User.Loc.Map))
                    {
                        
Mob M = (Mob)((Hashtable)(World.H_Mobs[User.Loc.Map]))[Single];
                        if (
!= null && M.Alive)
                            
MobTargets.Add(MGetDamage(M));
                    }
                }
                else
                {
                    
bool RangeFromChar true;
                    if (
Info.Targetting == TargetType.FromSingle)
                    {
                        
Mob M = (Mob)((Hashtable)(World.H_Mobs[User.Loc.Map]))[Single];
                        if (
!= null && M.Alive)
                        {
                            
MobTargets.Add(MGetDamage(M));
                            
AimX M.Loc.X;
                            
AimY M.Loc.Y;
                            
RangeFromChar false;
                        }
                    }
                    else if (
Info.Targetting != TargetType.Sector && Info.Targetting != TargetType.Linear && Info.Targetting != TargetType.Range && Info.Targetting != TargetType.FromPoint)
                    {
                        
AimX User.Loc.X;
                        
AimY User.Loc.Y;
                        
RangeFromChar true;
                    }
                    else
                        
RangeFromChar false;
                    
Hashtable MapMobs = (Hashtable)World.H_Mobs[User.Loc.Map];
                    if (
MapMobs != null)
                        foreach (
Mob M in MapMobs.Values)
                        {
                            if (
M.Alive)
                            {
                                if ((!
RangeFromChar && MyMath.PointDistance(AimXAimYM.Loc.XM.Loc.Y) <= Info.MaxDist) || MyMath.PointDistance(User.Loc.XUser.Loc.YM.Loc.XM.Loc.Y) <= Info.MaxDist)
                                    if (
Info.Targetting == TargetType.Sector && InSector(M.Loc.XM.Loc.Y) || Info.Targetting != TargetType.Sector)
                                        if (
Info.Targetting == TargetType.Linear && MyMath.PointDirecton(User.Loc.XUser.Loc.YAimXAimY) == MyMath.PointDirecton(User.Loc.XUser.Loc.YM.Loc.XM.Loc.Y) || Info.Targetting != TargetType.Linear)
                                            if (
User.PKMode == PKMode.PK || !M.NeedsPKMode && !MobTargets.Contains(M))
                                                
MobTargets.Add(MGetDamage(M));
                            }
                        }
                }
            } 
and this is bored from saying things i don't understand

PHP Code:
 public void GetTargets(uint Single)
            {
                try
                {
                    
GetMobTargets(Single);
                    
GetPlayerTargets(Single);
                    
GetNPCTargets(Single);
                    
GetMiscTargets(Single);
                }
                catch (
Exception Exc) { Program.WriteLine(Exc); }
            } 
what do you think is going on?

PS: don't do it for me, i'm here to learn , i need an explanation of what's wrong and how to fix it
C#Storm is offline  
Old 10/05/2011, 19:50   #2
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Line 232 and line 147.

Nothing else.
BaussHacker is offline  
Old 10/06/2011, 13:42   #3
 
C#Storm's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 146
Received Thanks: 57
yes i trynna ask for: what's going on there , i know how to read exeptions, it's coded by you btw
C#Storm is offline  
Old 10/06/2011, 15:03   #4
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
I need the lines...
BaussHacker is offline  
Old 10/06/2011, 15:40   #5
 
C#Storm's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 146
Received Thanks: 57
Quote:
public void GetTargets(uint Single)
{
try
{
GetMobTargets(Single);//line 147
GetPlayerTargets(Single);
GetNPCTargets(Single);
GetMiscTargets(Single);
}
catch (Exception Exc) { Program.WriteLine(Exc); }
}
Quote:
void GetMobTargets(uint Single)
{
if (Info.ExtraEff == ExtraEffect.Ride || Info.ExtraEff == ExtraEffect.UnMount) return;
if (Info.Targetting == TargetType.Single)
{
if (World.H_Mobs.Contains(User.Loc.Map))
{
Mob M = (Mob)((Hashtable)(World.H_Mobs[User.Loc.Map]))[Single];
if (M != null && M.Alive)
MobTargets.Add(M, GetDamage(M));
}
}
else
{
bool RangeFromChar = true;
if (Info.Targetting == TargetType.FromSingle)
{
Mob M = (Mob)((Hashtable)(World.H_Mobs[User.Loc.Map]))[Single];//line232
if (M != null && M.Alive)
{
MobTargets.Add(M, GetDamage(M));
AimX = M.Loc.X;
AimY = M.Loc.Y;
RangeFromChar = false;
}
}
else if (Info.Targetting != TargetType.Sector && Info.Targetting != TargetType.Linear && Info.Targetting != TargetType.Range && Info.Targetting != TargetType.FromPoint)
{
AimX = User.Loc.X;
AimY = User.Loc.Y;
RangeFromChar = true;
}
else
RangeFromChar = false;
Hashtable MapMobs = (Hashtable)World.H_Mobs[User.Loc.Map];
if (MapMobs != null)
foreach (Mob M in MapMobs.Values)
{
if (M.Alive)
{
if ((!RangeFromChar && MyMath.PointDistance(AimX, AimY, M.Loc.X, M.Loc.Y) <= Info.MaxDist) || MyMath.PointDistance(User.Loc.X, User.Loc.Y, M.Loc.X, M.Loc.Y) <= Info.MaxDist)
if (Info.Targetting == TargetType.Sector && InSector(M.Loc.X, M.Loc.Y) || Info.Targetting != TargetType.Sector)
if (Info.Targetting == TargetType.Linear && MyMath.PointDirecton(User.Loc.X, User.Loc.Y, AimX, AimY) == MyMath.PointDirecton(User.Loc.X, User.Loc.Y, M.Loc.X, M.Loc.Y) || Info.Targetting != TargetType.Linear)
if (User.PKMode == PKMode.PK || !M.NeedsPKMode && !MobTargets.Contains(M))
MobTargets.Add(M, GetDamage(M));
}
}
}
}

RED LINES are 147 and 232
C#Storm is offline  
Old 10/06/2011, 16:13   #6
 
pwerty's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 55
Received Thanks: 11
System.NullReferenceException: Object reference not set to an instance of an object.

meh.
pwerty is offline  
Old 10/06/2011, 16:23   #7
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Mob M is null.
BaussHacker is offline  
Old 10/06/2011, 18:41   #8
 
elite*gold: 0
Join Date: Feb 2007
Posts: 340
Received Thanks: 38
nah it shouldn't give error on that line if mob is null...
either hashtable is null or user is null...logging off while attacking could cause this...
ryuchetval is offline  
Thanks
1 User
Old 10/06/2011, 19:09   #9
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Quote:
Originally Posted by ryuchetval View Post
nah it shouldn't give error on that line if mob is null...
either hashtable is null or user is null...logging off while attacking could cause this...
This ^

I was overlooking the code.
BaussHacker is offline  
Reply


Similar Threads Similar Threads
Minecraft Exeption
05/03/2011 - Minecraft - 3 Replies
Hey pvpers Immer wenn ich auf einen MC-Server möchte (habs mir gekauft) kommt diese Meldung: ImageShack&#174; - Online Photo and Video Hosting Früher als ich ne *-----* Version hatte ging es auf cracked server... Was soll ich tun??????????????????????????????????
[Error]Internal exeption
11/14/2010 - Minecraft - 0 Replies
Weiß woher es kommt. #closerequest
K2 Exeption
01/15/2010 - Heroes of Newerth - 0 Replies
pano po i solve k2 exeption?



All times are GMT +1. The time now is 20:32.


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