.:: 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
See this !!!
Old
  (#1)
slash-evil
Guest
 
Status:
Posts: n/a
Default See this !!! - 06-03-2004

See this piece of code ...

Code:
if(BotGetSafeTask(pBot)->iTask != TASK_PLANTBOMB && BotGetSafeTask(pBot)->iTask != TASK_DEFUSEBOMB)
if(pBot->current_weapon.iId == CS_WEAPON_C4)
{
     if (pBot)
     {
          if (paths[pBot->curr_wpt_index]->flags & W_FL_GOAL)
          {
               pEdict->v.button = (pEdict->v.button | IN_ATTACK);
               pEdict->v.button|=IN_DUCK;
               pEdict->v.button &= ~(IN_JUMP);
               pBot->f_move_speed=0; pBot->f_sidemove_speed=0;  
          }
          else
          BotSelectBestWeapon(pBot);
     }
}
else
pEdict->v.button = 0;
It always causing crash , do you guys see any problems of the code ???
  
Reply With Quote
Re: See this !!!
Old
  (#2)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: See this !!! - 06-03-2004

Is 'pBot' not NULL? Is 'pBot->curr_wpt_index' greater than the size of the 'paths' array (or is it negative)? Is 'pEdit' not NULL?

botman
  
Reply With Quote
Re: See this !!!
Old
  (#3)
slash-evil
Guest
 
Status:
Posts: n/a
Default Re: See this !!! - 06-03-2004

I think pBot is NULL
  
Reply With Quote
Re: See this !!!
Old
  (#4)
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: See this !!! - 06-03-2004

This piece of code comes from the POD-bot source code ; I recognize it. This code is part of Count Floyd's BotThink(), which is called in StartFrame() for every valid bot, hence pBot CANNOT be NULL.

your problem may come that pBot->curr_wpt_index is uninitialized (I bet it's -1).



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: See this !!!
Old
  (#5)
slash-evil
Guest
 
Status:
Posts: n/a
Default Re: See this !!! - 07-03-2004

uninitialized ??? How to initialized it ? My C++ skill is extremly bad !
  
Reply With Quote
Re: See this !!!
Old
  (#6)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: See this !!! - 07-03-2004

that's cool, cause now you know what you should do before starting to write a bot


  
Reply With Quote
Re: See this !!!
Old
  (#7)
slash-evil
Guest
 
Status:
Posts: n/a
Default Re: See this !!! - 07-03-2004

Punishing me ? Whoa , now my bot crash at any point after I start my server since I try to "initialized" the pBot->curr_wpt_index ! Man , I need to redone my bot , so lame !
  
Reply With Quote
Re: See this !!!
Old
  (#8)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: See this !!! - 07-03-2004

www.cplusplus.com

botman
  
Reply With Quote
Re: See this !!!
Old
  (#9)
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: See this !!! - 07-03-2004

@slash-evil: now once and for all it's not "your" bot, it's Count Floyd's bot, PERIOD. Changing one or two lines of code in a 10,000 lines of C code bot, doesn't make this bot yours. You're hijacking all the hard work Count Floyd did in his bot and fooling people with your so-called "Slashbot", in which all you did was patching one or two things. I don't mean to take you down but consider that nobody of us ever made the insult to botman to only change 2 lines in the HPB_bot before forking and making our own releases.

Modesty is a quality, "creator of SLASHbot". You did not create anything. So settle down and grab a good tutorial about C/C++; make yourself discrete for one year or two and THEN, show us what you learned. In the meantime, stop drawing the attention to yourself this way. Now I learn you requested to be part of Bots United ? You want us to host the SlashBot website, is that right ?

You'll soon be walking a fine line if you continue this way.



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: See this !!!
Old
  (#10)
slash-evil
Guest
 
Status:
Posts: n/a
Default Re: See this !!! - 08-03-2004

No ,its wrong , I don't want a website , I am a student , I need to give consetration on my academic , so I am learning now , but really , it is not my bot , I just ripped it , sorry for it !
  
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