.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Help Needed !!!
Old
  (#1)
slash-evil
Guest
 
Status:
Posts: n/a
Default Help Needed !!! - 28-02-2004

In my bot debugging process , I found out that in my ot code , this line is always causing crash

if(paths[pBot->curr_wpt_index]->flags & W_FL_GOAL)

(it is a part of bomb planting !)

I try to fix it , but it still happened , does who know why this happened ? ???
  
Reply With Quote
Re: Help Needed !!!
Old
  (#2)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Help Needed !!! - 28-02-2004

if 'pBot->curr_wpt_index' is too large (bigger than the size of the 'paths' array) that can cause an access violation trying to access memory that the process don't have in it's memory space.

Also, if 'pBot' is NULL, this will cause it to crash.

Put in some code to print the value of 'pBot->curr_wpt_index' to a text file or to the console (or HUD) so you can see what the values are. Also change the code to look more like this...

if (pBot)
{
if (paths[pBot->curr_wpt_index]->flags & W_FL_GOAL)
{
// do stuff here
}
}

botman
  
Reply With Quote
Re: Help Needed !!!
Old
  (#3)
slash-evil
Guest
 
Status:
Posts: n/a
Default Re: Help Needed !!! - 28-02-2004

thanks botman currently I am testing the code !
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com