Re: Bot compiles, Bot runs... No wait, it crashes on startup -
08-03-2004
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 ?
RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
|