param1: #(param2: 123
param3: Using classes for each MOD may be nice smile.gif

i.e., don't use this:
CODE

if (mod_id == VALVE_DLL)
{
 ...something
}
else if (mod_id == NS_DLL)
{
... something
}

use this instead:
class CBaseBot
{
public:
virtual DoOperations();
}

class CBotValve : CBaseBot
{
...
}

class CBotNS : CBaseBot
{
...
}

CBotValue::DoOperations()
{
...something
}

CBotNS::DoOperations()
{
..some other things
}
[/code]
IPB WARNING [2] preg_replace_callback(): Requires argument 2, '123', to be a valid callback (Line: 378 of /sources/classes/bbcode/class_bbcode.php)
param1: #(
param2: 123
param3: yes I know but its too late now blink.gif
IPB WARNING [2] preg_replace_callback(): Requires argument 2, '123', to be a valid callback (Line: 378 of /sources/classes/bbcode/class_bbcode.php)
An idea - RCBot Forums

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> An idea
Whistler
post Feb 28 2004, 01:53 AM
Post #1


Newbie
*

Group: Members
Posts: 8
Joined: 25-February 04
Member No.: 257



Using classes for each MOD may be nice smile.gif

i.e., don't use this:
CODE

if (mod_id == VALVE_DLL)
{
 ...something
}
else if (mod_id == NS_DLL)
{
... something
}

use this instead:
class CBaseBot
{
public:
virtual DoOperations();
}

class CBotValve : CBaseBot
{
...
}

class CBotNS : CBaseBot
{
...
}

CBotValue::DoOperations()
{
...something
}

CBotNS::DoOperations()
{
..some other things
}
[/code]
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Feb 28 2004, 11:37 AM
Post #2


Admin
*****

Group: Admin
Posts: 3,056
Joined: 11-September 03
From: uk
Member No.: 1



yes I know but its too late now blink.gif
User is online!Profile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 

- Lo-Fi Version Time is now: 28th April 2024 - 03:16 PM