Closed ghost closed 11 years ago
You can't message an offline bot and pass commands to the Bot Manager.
No I have 2 bots and message the online one.
I'm guessing your Bmanager
variable isn't actually assigned to.
Oh, and #307 - this isn't the place for programming help, but actual issues with SteamBot.
private readonly BotManager Bmanager;
private int SIndex = -1;
Okay so I wanted to start bots by messaging them ".start (#)" or ".stop (#)" because sometimes one crashes and I want to not have to leave my computer to go to the server. Anyway here is my code:
When I try to do this I get this error:
[Keymac [BOT] 2013-07-30 08:41:25] ERROR: Unhandled exceptions in bot Keymac [BOT] callback thread: System.NullReferenceException: Object reference not set to an instance of an object at SteamBot.KeyUserHandler.OnMessage (System.String message, EChatEntryType type) [0x00c3a] in /home/twg/Desktop/SteamBot/SteamBot/KeyUserHandler.cs:270 at SteamBot.Bot.m__5 (SteamKit2.FriendMsgCallback callback) [0x0004b] in /home/twg/Desktop/SteamBot/SteamBot/Bot.cs:415
at SteamKit2.CallbackMsg.Handle[FriendMsgCallback](System.Action`1 handler) [0x00028] in /home/twg/Desktop/SteamBot/Lib/SteamKit2/SteamKit2/Steam3/SteamClient/CallbackMgr/CallbackMsg.cs:55
at SteamBot.Bot.HandleSteamMessage (SteamKit2.CallbackMsg msg) [0x00076] in /home/twg/Desktop/SteamBot/SteamBot/Bot.cs:404
at SteamBot.Bot.BackgroundWorkerOnDoWork (System.Object sender, System.ComponentModel.DoWorkEventArgs doWorkEventArgs) [0x00012] in /home/twg/Desktop/SteamBot/SteamBot/Bot.cs:678
at System.ComponentModel.BackgroundWorker.OnDoWork (System.ComponentModel.DoWorkEventArgs e) [0x00000] in :0
at System.ComponentModel.BackgroundWorker.ProcessWorker (System.Object argument, System.ComponentModel.AsyncOperation async, System.Threading.SendOrPostCallback callback) [0x00000] in :0
Although I think that this is the important part: System.NullReferenceException: Object reference not set to an instance of an object