.:: 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 ::. > Cyborg Factory > RealBot > The RealBot 'Source'
The RealBot 'Source' Discuss things about the source code. You can here point out bugs, share ideas and code. Assign to become an 'official team member' and so on!

Reply
 
Thread Tools
Is this correct? or is it a bug?
Old
  (#1)
[BBB]sluggo
Member
 
[BBB]sluggo's Avatar
 
Status: Offline
Posts: 153
Join Date: Jan 2004
Location: Stockholm, Sweden
Default Is this correct? or is it a bug? - 08-09-2004

Hi, like I said before... I can not code but when looking at the code I found something that I cant understand... let's see if I can paste it correctly

Code:
if (team == 2) // Counter-Terrorist *sluggo* if CT then do the first switch?
{
// 30/07/04 by Josh
// Use a switch instead of multiple if
// *sluggo*Is this correct? Shouldn't the switch:es change places?
// *sluggo*If the bot is CT then it goes to the first switch and thats the Terrorist weapons? or am I missing something?
switch (weapon)
{
case CS_WEAPON_SG552: return false; break;
case CS_WEAPON_AK47: return false; break;
case CS_WEAPON_ELITE: return false; break;
case CS_WEAPON_MAC10: return false; break;
case CS_WEAPON_GALIL: return false; break;
// 30.8.04 added by frashman
case CS_WEAPON_G3SG1: return false; break;
}
}
else
{
switch (weapon)
{
case CS_WEAPON_AUG: return false; break;
case CS_WEAPON_FIVESEVEN: return false; break;
case CS_WEAPON_M4A1: return false; break;
case CS_WEAPON_TMP: return false; break;
case CS_WEAPON_FAMAS: return false; break;
case CS_WEAPON_SHIELD: return false; break;
//30.8.04 added by Frashman
case CS_WEAPON_SG550: return false; break;
case CS_DEFUSEKIT: return false; break;
}
}
Nope, can't get the code tag to work.. sry..



dstruct2k: That's because it isn't an HTML tag. Use [] instead of <>


An expert is a person who has made all the mistakes that can be made in a very narrow field. Niels Bohr (1885 - 1962)

Last edited by dstruct2k; 09-09-2004 at 23:01..
  
Reply With Quote
Re: Is this correct? or is it a bug?
Old
  (#2)
Josh_Borke
Member
 
Status: Offline
Posts: 152
Join Date: Jun 2004
Default Re: Is this correct? or is it a bug? - 08-09-2004

if they are on the CT team, then those weapons will return false, meaning they are not good weapons for them to buy, therefore they will not buy them.

rather than return true for each weapon, we return false for exclusive weapons
less code

HTH
  
Reply With Quote
Re: Is this correct? or is it a bug?
Old
  (#3)
[BBB]sluggo
Member
 
[BBB]sluggo's Avatar
 
Status: Offline
Posts: 153
Join Date: Jan 2004
Location: Stockholm, Sweden
Default Re: Is this correct? or is it a bug? - 09-09-2004

I must learn to code so I don't have to take up half the forum space with stupid questions! :o :o

Thanks for the info Josh!


An expert is a person who has made all the mistakes that can be made in a very narrow field. Niels Bohr (1885 - 1962)
  
Reply With Quote
Re: Is this correct? or is it a bug?
Old
  (#4)
frashman
Member
 
Status: Offline
Posts: 36
Join Date: Jun 2004
Location: Germany
Default Re: Is this correct? or is it a bug? - 09-09-2004

to learn coding, you should first code some simple programs. try to begin with some c++ tutorials.
Later you can look at Realbot Source. Ok do what you want.


MfG Frashman
  
Reply With Quote
Re: Is this correct? or is it a bug?
Old
  (#5)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: Is this correct? or is it a bug? - 09-09-2004

to post code you can use [ code] and [ /code] tags (without spaces)
  
Reply With Quote
Re: Is this correct? or is it a bug?
Old
  (#6)
[BBB]sluggo
Member
 
[BBB]sluggo's Avatar
 
Status: Offline
Posts: 153
Join Date: Jan 2004
Location: Stockholm, Sweden
Default Re: Is this correct? or is it a bug? - 09-09-2004

Quote:
Originally Posted by frashman
to learn coding, you should first code some simple programs. try to begin with some c++ tutorials.
Later you can look at Realbot Source. Ok do what you want.
Thanks, I'll do that. Going to search the internet for tutorials... there should be some out there

Quote:
Originally Posted by Whistler
to post code you can use [ code] and [ /code] tags (without spaces)
Uhm, thanks :o I tried it with <code> </code> ... didn't work 9_9

When I have learned some coding I will be back with some intelligent questions for a change
Until then, keep up the good work guys! (and girls if any?)
  
Reply With Quote
Re: Is this correct? or is it a bug?
Old
  (#7)
Ry Spy
Member
 
Ry Spy's Avatar
 
Status: Offline
Posts: 45
Join Date: Aug 2004
Default Re: Is this correct? or is it a bug? - 13-09-2004

It's not a stupid question for me. It's perfectly natural for begginers, but when you get used to it, it is as easy as pie.


Ry Spy
  
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