Connecting a Bot
by Eric Armstrong · in Torque Game Engine · 01/13/2003 (7:20 pm) · 3 replies
I'm experiencing strange errors when I try at add a bot. I am using the HEAD version as of Saturday 1-11-03. I added the missing files to the project and re-compiled, that all went without a hitch. When I attempt to add the bot through the console, I get an access violation. I am using the following command to create the bot:
The access violation is in the method objectLocalScopeAlways in netGhost.cc. The line within the method that the error occurs is:
According to the watches, GhostLookupTableSize is 1024, but the mGhostLookupTable array is null. From within the aiAddPlayer method, everything works fine until I call the script method onConnect. If I comment out that call from within aiAddPlayer, no errors happen, but of course the bot does not show up anywhere.
Has anyone else ran into this, or can at least help me out in tracing from the script back into the engine? I can probably figure it out if I can follow the flow from start to finish. Any help would be greatly appreciated.
Thanks,
Eric
$myBot = aiAddPlayer("Test");The access violation is in the method objectLocalScopeAlways in netGhost.cc. The line within the method that the error occurs is:
for(GhostInfo *walk = mGhostLookupTable[obj->getId() & (GhostLookupTableSize - 1)]; walk; walk = walk->nextLookupInfo)
According to the watches, GhostLookupTableSize is 1024, but the mGhostLookupTable array is null. From within the aiAddPlayer method, everything works fine until I call the script method onConnect. If I comment out that call from within aiAddPlayer, no errors happen, but of course the bot does not show up anywhere.
Has anyone else ran into this, or can at least help me out in tracing from the script back into the engine? I can probably figure it out if I can follow the flow from start to finish. Any help would be greatly appreciated.
Thanks,
Eric
#2
Eric
01/15/2003 (8:40 am)
Got it all worked out, turns out I wasn't updating from the GG cvs server. I really need to drop winCVS and just use the command line, it's much easier once everythig is set-up. Thanks for your help.Eric
#3
01/15/2003 (9:18 am)
You might also try tortoiseCVS... It's really nice. And it integrates with explorer.
Associate Stefan Beffy Moises
it's "AIPlayer::spawnPlayer()" now... check out this: tork.zenkel.com/tutorials/bots/adding_bots.php...