Beginner / noob - need help :/
I figured i'd start making a bot, now i've spent the last 4 hours reading about HPB, and playing around in MSVS.
I want to make a bot for the mod NS (Natural-Selection) I used the exports.c, and removed the dublicates, added it to linkfunc.cpp next I added Quote:
and in bot.h I added #define NSP_DLL 6 so far so good, I then compiled the DLL file changed the liblist.gam to the name of the DLL opened NS, created a server. and puff back to the desktop :/ Is there any way i can get error logs or something :/ or do someone know what might be wrong? :) |
Re: Beginner / noob - need help :/
change all the "ALERT(at_error, "blahblah")" to make it log into a file.
|
Re: Beginner / noob - need help :/
Quote:
I have no idea on how I can make it to log into a file :) |
Re: Beginner / noob - need help :/
Code:
FILE *fp = fopen("logfile.txt", "a"); botman |
Re: Beginner / noob - need help :/
run a dedicated server and tie the bot DLL to the MSVC debugger... then set breakpoints on the critical functions such as GetEntityAPI() and GiveFnptrsToDll()
It'll tell you what's wrong since you'll be able to *see* how the code performs |
Re: Beginner / noob - need help :/
Quote:
Quote:
|
Re: Beginner / noob - need help :/
http://racc.bots-united.com/msvc-debug-howto.png
A picture is worth a thousand words... :) Of course the server should load the bot DLL And of course, the bot DLL should be compiled in DEBUG mode. Then instead of starting the HL server the normal way, click on the "start debug" (F5) button in the MSVC toolbar. This will launch the server for you. Don't forget to set a few breakpoints before :) |
Re: Beginner / noob - need help :/
the first thing that happens is that it says one or more breakpoints hav ebeen disabled, then it shows a dissasembly window :>tried to step into and so on, but can't figure out what is wrong :/
|
Re: Beginner / noob - need help :/
That's because you haven't compiled in debug mode, the debug symbols are not enabled. Normally in place of these assembly codes you would see your C/C++ code if it was compiled with debug symbols.
To enable that you must set the appropriate options in the "C/C++" and "Link" tabs of your project settings (in the same window as the screenshot I posted above) |
Re: Beginner / noob - need help :/
Would you mind cutting it out in pieces what I should do, under debug I have added what I need, apparently I can't figure out the other parts, C/C++ should be set to optimizations (Default), and link to (debug) Is this correct?
|
All times are GMT +2. The time now is 16:51. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.