.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   pBot->pBotEnemy->v.netname causing crash (http://forums.bots-united.com/showthread.php?t=2195)

bomberman 04-07-2004 16:23

pBot->pBotEnemy->v.netname causing crash
 
Code:

if (strstr(bot_kill[kill_index], "%s") != NULL)  // is "%s" in whine text?
sprintf(msg, bot_kill[kill_index]/*, STRING(pBot->pBotEnemy->v.netname)*/);

I use this code to let the bot chat , but the "pBot->pBotEnemy->v.netname"
is causing crash ! Anyone know why this happen ?

and btw , I'm using STEAM cs1.6

Cheeseh 04-07-2004 20:08

Re: pBot->pBotEnemy->v.netname causing crash
 
is pBot NULL?

is pBot->pBotEnemy NULL?
I'm guessing pBotenemy is NULL, shouldn't it be victim_edict or something instead of pBotEnemy?

Pierre-Marie Baty 05-07-2004 02:02

Re: pBot->pBotEnemy->v.netname causing crash
 
when the bot dies, it resets itself.
Which means that pBotEnemy is likely to be zeroed out. :)

bomberman 05-07-2004 07:49

Re: pBot->pBotEnemy->v.netname causing crash
 
ok , I fix the bug , yeah because the pBot->pBotEnemy was zerod out , thanks for your help


All times are GMT +2. The time now is 19:00.

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