![]() |
Help Needed !!!
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 ? ???:( |
Re: Help Needed !!!
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 |
Re: Help Needed !!!
thanks botman currently I am testing the code !
|
All times are GMT +2. The time now is 16:30. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.