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

How to debug "Could not construct instance of botname"?

jim87

New Member
Joined
Aug 26, 2011
Messages
445
Reaction score
7
Hello!

Today I started working again on a bot I never finished, but big surprise? The new HB started throwing an error:
Code:
[20:29:14:229] Could not construct instance of JimmyBuddy! Exception was thrown. Exception:
[20:29:14:230] Riferimento a un oggetto non impostato su un'istanza di oggetto.

And the italian string means "Object reference not set to an instance of an object"... no line pointing, not an error when I try to build the dll manually inside VisualStudio!

Any hint? It was working on the previous version of HB, I changed nothing untill then. Thanks :)
 
Hello!

Today I started working again on a bot I never finished, but big surprise? The new HB started throwing an error:
Code:
[20:29:14:229] Could not construct instance of JimmyBuddy! Exception was thrown. Exception:
[20:29:14:230] Riferimento a un oggetto non impostato su un'istanza di oggetto.

And the italian string means "Object reference not set to an instance of an object"... no line pointing, not an error when I try to build the dll manually inside VisualStudio!

Any hint? It was working on the previous version of HB, I changed nothing untill then. Thanks :)

Post your log, as it's hard to see without log/code.
 
Last edited:
By the way I've noticed that the Singular's error shows up only when the bot is being compiled...
 
I've noticed that this problem is not present whenever I have a custom combat profile other than Singular, otherwise no errors popup... thus it seems that in somehow way the HB requires the combat profile before it's ready. It's strange though, as I call it via a BehaviorTree... may it be due to the legacy Combat() method I call in case the new one is not present?

PHP:
            #region Combat
            // I'm in combat and I'm not mounted
            // (i.e. I have to fight)
            new Decorator(c => Me.Combat && !Me.Mounted,
                new PrioritySelector(
                    // Equip weapons, if any
                    new DecoratorEquipWeapons(new ActionEquipWeapons()),
                    // Behavior Tree-based combat routine
                    new Decorator(c => RoutineManager.Current.CombatBehavior != null,
                        new PrioritySelector(
                            RoutineManager.Current.CombatBehavior,
                            new Action(delegate { return RunStatus.Success; })
                        )
                    ),
                    // Legacy Combat() method
                    new Action(ret => RoutineManager.Current.Combat())
                )
            ),
            #endregion
 
Last edited:
Back
Top