What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

CC Error, can't figure out what's causing it.

ski

Well-Known Member
Joined
Feb 12, 2010
Messages
3,720
Getting this error a lot in my log:

[2:52:53 AM:826] Object reference not set to an instance of an object. - From: ko0qjr-6 at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 504
at (Object )
at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()

Here is that section of code (This is my own CC, so normally I can fix issues, but this one's got me confused):

Code:
    #region bugged mobs or adds
            if (!fightTimer.IsRunning ||
               Me.CurrentTarget.Guid != lastGuid)
            {
                fightTimer.Reset();
                fightTimer.Start();
                lastGuid = Me.CurrentTarget.Guid;
            }
            // blacklist mob for an hour if its bugged
            if (fightTimer.ElapsedMilliseconds > 40 * 1000 &&
                Me.CurrentTarget.HealthPercent > 95)
            {
                slog("Combat: This " + Me.CurrentTarget.Name + " is a bugged mob.  Blacklisting for 1 hour.");

                Logic.Blacklist.Add(Me.CurrentTarget.Guid, TimeSpan.FromHours(1.00));

                Styx.Helpers.KeyboardManager.PressKey('S');
                Thread.Sleep(5 * 1000);
                Styx.Helpers.KeyboardManager.ReleaseKey('S');
                Me.ClearTarget();
                lastGuid = 0;
                return;
            }

I'm not sure what's causing it, any ideas? If this belongs in another section, please toss it over there instead.
 

Attachments

Last edited:
change
Code:
if (!fightTimer.IsRunning ||
               Me.CurrentTarget.Guid != lastGuid)
to
Code:
if (!fightTimer.IsRunning || Me.CurrentTarget.Guid != lastGuid)

-shurgs- could be counting the whitespaces if you copied and pasted from mWarlock
 
change
Code:
if (!fightTimer.IsRunning ||
               Me.CurrentTarget.Guid != lastGuid)
to
Code:
if (!fightTimer.IsRunning || Me.CurrentTarget.Guid != lastGuid)

-shurgs- could be counting the whitespaces if you copied and pasted from mWarlock

No luck, still doing the same thing. Nothing on that line seems out of place either. Hmm. It does only happen after I kill an add and have no target, so maybe its bugging out on the Me.CurrentTarget.Guid part...


Code:
[2:53:29 PM:271] Skeletal Sorcerer is dead
[2:53:30 PM:5] Take first known target.
[2:53:30 PM:17] Combat Exception
[2:53:30 PM:24]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:30 PM:404] Target nearest enemy.
[2:53:30 PM:416] Combat Exception
[2:53:30 PM:422]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:30 PM:798] Skeletal Sorcerer is dead
[2:53:31 PM:473] Target nearest enemy.
[2:53:31 PM:485] Combat Exception
[2:53:31 PM:489]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:31 PM:803] Target nearest enemy.
[2:53:31 PM:815] Combat Exception
[2:53:31 PM:821]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:32 PM:186] Target nearest enemy.
[2:53:32 PM:197] Combat Exception
[2:53:32 PM:204]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:32 PM:530] Target nearest enemy.
[2:53:32 PM:543] Combat Exception
[2:53:32 PM:550]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:32 PM:907] Target nearest enemy.
[2:53:32 PM:919] Combat Exception
[2:53:32 PM:926]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:33 PM:211] Target nearest enemy.
[2:53:33 PM:224] Combat Exception
[2:53:33 PM:227]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:33 PM:556] Target nearest enemy.
[2:53:33 PM:569] Combat Exception
[2:53:33 PM:576]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:33 PM:953] Target nearest enemy.
[2:53:33 PM:959] Combat Exception
[2:53:33 PM:963]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:34 PM:274] Target nearest enemy.
[2:53:34 PM:280] Combat Exception
[2:53:34 PM:284]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:34 PM:607] Target nearest enemy.
[2:53:34 PM:618] Combat Exception
[2:53:34 PM:626]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:34 PM:923] Target nearest enemy.
[2:53:34 PM:935] Combat Exception
[2:53:34 PM:941]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:35 PM:295] Target nearest enemy.
[2:53:35 PM:307] Combat Exception
[2:53:35 PM:312]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:35 PM:620] Target nearest enemy.
[2:53:35 PM:627] Combat Exception
[2:53:35 PM:633]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:35 PM:964] Target nearest enemy.
[2:53:35 PM:971] Combat Exception
[2:53:35 PM:977]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:36 PM:245] Target nearest enemy.
[2:53:36 PM:255] Combat Exception
[2:53:36 PM:261]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:36 PM:580] Target nearest enemy.
[2:53:36 PM:587] Combat Exception
[2:53:36 PM:591]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:36 PM:832] Target nearest enemy.
[2:53:36 PM:843] Combat Exception
[2:53:36 PM:850]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:37 PM:89] Target nearest enemy.
[2:53:37 PM:104] Combat Exception
[2:53:37 PM:107]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:37 PM:385] Target nearest enemy.
[2:53:37 PM:397] Combat Exception
[2:53:37 PM:403]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:37 PM:717] Target nearest enemy.
[2:53:37 PM:724] Combat Exception
[2:53:37 PM:728]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:38 PM:32] Target nearest enemy.
[2:53:38 PM:43] Combat Exception
[2:53:38 PM:51]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:38 PM:337] Target nearest enemy.
[2:53:38 PM:348] Combat Exception
[2:53:38 PM:355]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:38 PM:760] Target nearest enemy.
[2:53:38 PM:773] Combat Exception
[2:53:38 PM:778]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:39 PM:158] Target nearest enemy.
[2:53:39 PM:170] Combat Exception
[2:53:39 PM:176]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:39 PM:550] Target nearest enemy.
[2:53:39 PM:561] Combat Exception
[2:53:39 PM:577]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:39 PM:940] Target nearest enemy.
[2:53:39 PM:946] Combat Exception
[2:53:39 PM:950]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:40 PM:345] Target nearest enemy.
[2:53:40 PM:378] Combat Exception
[2:53:40 PM:382]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:40 PM:681] Target nearest enemy.
[2:53:40 PM:688] Combat Exception
[2:53:40 PM:692]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:41 PM:892] Target nearest enemy.
[2:53:41 PM:925] Combat Exception
[2:53:41 PM:930]  Object reference not set to an instance of an object. - From: ghm4jvji   at Styx.Bot.CustomClasses.AfflictionWarlock.Combat() in c:\hb\CustomClasses\DemonWarlock.cs:line 505
   at (Object )
   at Styx.Logic.Common.Combat.CustomCombat.CustomCombat.Combat()
[2:53:42 PM:983] needRest: Need to Lifetap
 
This error is when you are trying to use a instance/member of a Null Object.

I see fightTimer is instanced with a new Stopwatch();

Maybe lastGuid is null or currentTarget is null.
try to check if Me.GotTarget before...

Code:
if (Me.GotTarget)
 if (!fightTimer.IsRunning ||
               Me.CurrentTarget.Guid != lastGuid)
 
Back
Top