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

CastOnGround getting error

izzy

Member
Joined
Jan 15, 2010
Messages
249
Reaction score
7
so this is the code. It still cast the spell but with a error that's making Singular lag a bit. " Spell.CastOnGround("Rain of Fire", ret => StyxWoW.Me.CurrentTarget.Location), ". this is what gets printed to the debug screen.------>> Any Idea's why this is happening? I'm not seeing any errors in MS C# when looking through the code.

[7:56:40 PM:691] System.NullReferenceException: Object reference not set to an instance of an object.
at Singular.ClassSpecific.Warlock.Demonology.<createdemonologywarlocknormalcombat>b__18(Object ret) in c:\HB\CustomClasses\Singular\ClassSpecific\Warlock\Demonology.cs:line 103
at Singular.Helpers.Spell.<>c__DisplayClass78.<castonground>b__77(Object ret) in c:\HB\CustomClasses\Singular\Helpers\Spell.cs:line 866
at TreeSharp.Action.RunAction(Object context)
at TreeSharp.Action.#h.#nF.MoveNext()
at (Object )
at TreeSharp.Composite.Tick(Object context)
at TreeSharp.Sequence.#h.#nF.MoveNext()
at (Object )
at TreeSharp.Composite.Tick(Object context)
at Singular.SingularRoutine.LockSelector.Tick(Object context) in c:\HB\CustomClasses\Singular\SingularRoutine.cs:line 312
at TreeSharp.PrioritySelector.#h.#nF.MoveNext()
at (Object )
at TreeSharp.Composite.Tick(Object context)
at TreeSharp.Decorator.#h.#nF.MoveNext()
at (Object )
at TreeSharp.Composite.Tick(Object context)
at TreeSharp.PrioritySelector.#h.#nF.MoveNext()
at (Object )</castonground></createdemonologywarlocknormalcombat>
 
well its null so chances are your getting that if you dont have a Me.CurrentTarget.
 
make sure Me.CurrentTarget != null, obviously you cant do that all the time, since when the target dies its going to fail.
my suggestion would be to skip the method, and write your own, you need to cast the spell, wait a little bit, since the time it takes to bring up the AoE Circle takes a sec, and then do LegacySpellmanger.ClickRemoteLocation(Me.CurrentTarget.Location);
 
Back
Top