.:: 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
pBot->pBotEnemy->v.netname causing crash
Old
  (#1)
bomberman
Guest
 
Status:
Posts: n/a
Default pBot->pBotEnemy->v.netname causing crash - 04-07-2004

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
  
Reply With Quote
Re: pBot->pBotEnemy->v.netname causing crash
Old
  (#2)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: pBot->pBotEnemy->v.netname causing crash - 04-07-2004

is pBot NULL?

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

Last edited by Cheeseh; 04-07-2004 at 21:09..
  
Reply With Quote
Re: pBot->pBotEnemy->v.netname causing crash
Old
  (#3)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: pBot->pBotEnemy->v.netname causing crash - 05-07-2004

when the bot dies, it resets itself.
Which means that pBotEnemy is likely to be zeroed out.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: pBot->pBotEnemy->v.netname causing crash
Old
  (#4)
bomberman
Guest
 
Status:
Posts: n/a
Default Re: pBot->pBotEnemy->v.netname causing crash - 05-07-2004

ok , I fix the bug , yeah because the pBot->pBotEnemy was zerod out , thanks for your help
  
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 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com