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!

Querying Placeables: List of Invalid Objects

JoeBrewski

New Member
Joined
Jul 4, 2012
Messages
315
Just renewed my keys.

Sample Code (to query for all placeables within 120 meters) - If Aevitas could take a look at it, that'd be great.

...
foreach (TorPlaceable obj in ObjectManager.GetObjects<Buddy.Swtor.Objects.TorPlaceable>().OrderBy(t => t.Distance).Where(t => t.Distance <= 12.0f))
try
{...}
...

Returns a list of objects, but each and every one is invalid ("Object reference not set to an instance of an object.") - not sure if a bad DomDef or what.

Joe
 
Just renewed my keys.

Sample Code (to query for all placeables within 120 meters) - If Aevitas could take a look at it, that'd be great.

...
foreach (TorPlaceable obj in ObjectManager.GetObjects<Buddy.Swtor.Objects.TorPlaceable>().OrderBy(t => t.Distance).Where(t => t.Distance <= 12.0f))
try
{...}
...

Returns a list of objects, but each and every one is invalid ("Object reference not set to an instance of an object.") - not sure if a bad DomDef or what.

Joe


Yea myself and jnp found this out a while back. Aevitas has known this for some time. Why we wrote are own targeting provider to over come it. Last buddywing update has messed it up a bit but my current routine seems to run rather well. I talk to Aevitas on skype quite often and this issue is something that's not a simple fix. We are framelocking most of the code and it seems to help this issue. How isboxer works a lot better now. Just like we found out the getcheckhealth function is 100% related to stealthing in the game. Making the bot look for health of some one that now not around.



P.S. Nice to see you post on the forums again Joe! Welcome Back!
 
When enumerating collections like this, lock the frame. Consider what you're actually doing there takes a bit of time, stuff could go invalid. Having said that it shouldn't be returning actual null objects though.. o.O

Got a stack trace by chance? If the ObjectManager is simply returning "null" every single time then that's bad.
 
You don't have a null check inside your LINQ, i.e t => t != null

which is equal to if (t != null)
 
Thanks - very much appreciate it - added a framelock and now it seems alot faster and more reliable. Stack trace, I don't even have a clue on how to generate it - but will read-up on it. And Walter had mentioned framelocks as well, mybad on that and thank you Walter as well :)

Thanks again

Joe
 
Back
Top