.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   Bot compiles, Bot runs... No wait, it crashes on startup (http://forums.bots-united.com/showthread.php?t=1025)

Sweeper 08-03-2004 11:02

Bot compiles, Bot runs... No wait, it crashes on startup
 
I am having a problem here, I am trying to modify the HPB Bot to fit on a mod called Counter-Life.
Problem is, that it never gets to load the .dll file, upon load it crashes.
I have shown it the location of the mod Dll file.
I also tried making it use the Valve functions since the mod is basically HL with CS weapons.
I have added all the entilities that Botmans tool dumped to me.
It compiles without any errors other than 1 where it can't execute CMD.exe (Windows XP)
I'll get you some source copy if you can specify the parts you want.
I have edited Lincfunc.cpp to support the entilities and h_exports.cpp to the mod dll file.

But the game refuses to launch, I never see an error in the console (Running Developer mode as I allways do)

Any idea what I am doing wrong here? I am trying to follow Botmans directions in his readme.

Pierre-Marie Baty 08-03-2004 12:54

Re: Bot compiles, Bot runs... No wait, it crashes on startup
 
I suppose you're running it as a dedicated server, it helps to check for debug messages. Try several things:

The first functions that are called in your bot DLL are DllMain(), then GetEntityAPI() and GiveFnptrsToDll(). Try putting debug messages in them and see what is printed on the console. Try putting things like: printf("DllMain function called!\n") all around the place. Eventually, if you want the game to pause after each debug message, add a getchar(); to make it pause until you press the space bar. Note that you can't use this printf/getchar technique with a listenserver, it won't work (it will freeze your DLL).

The best way though to debug stuff, would be to set breakpoints in each of these functions and use the debugger. Do you know how to use the MSVC debugger ?

Sweeper 08-03-2004 15:33

Re: Bot compiles, Bot runs... No wait, it crashes on startup
 
Well, suffice to say, I can understand most of the C++, worst part is using it.
As for using a debugger, no, I am not used to it, in fact, this is the first project I do on it, after being a yoyo between several compilers.

To make a long story short, I have only coded 1 simple program before, a program that converts Fahrenheit values to Celsius and some float mods to it thereafter, but thats where it ends as well...

Botmans readme proved helpful for me to get started, and I tried to run the game the normal way, LAN Game -> Create and look for the infamous missing entilities and bugs (You are looking at somebody who ran firebot with FA 2.5 and 2.6)

Thanks for the help so far Pierre, did I mention that you are the fuel that has kept me on this project?


All times are GMT +2. The time now is 01:46.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.