Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 15:43

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Request]Organized chat.cs?

Discussion on [Request]Organized chat.cs? within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 03/06/2013, 19:45   #16
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
Quote:
Originally Posted by pro4never View Post
One cannot be 'both' a GM and a PM.
You simply add both tags to your name: [GM]Pro4Never[PM]. Common sense.
nTL3fTy is offline  
Old 03/06/2013, 19:54   #17
 
elite*gold: 0
Join Date: Mar 2013
Posts: 44
Received Thanks: 2
Quote:
Originally Posted by nTL3fTy View Post
You simply add both tags to your name: [GM]Pro4Never[PM]. Common sense.
Correct me if i'm wrong, but Pro4Never is right! You can't be both GM and PM...
If your in game name was [GM]Pro4Never[PM], the [PM] would be the status "tag?", and the first [GM] would just be a part of your character name. :-)
xScylez is offline  
Old 03/07/2013, 00:29   #18
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,379
Quote:
Originally Posted by xScylez View Post
Correct me if i'm wrong, but Pro4Never is right! You can't be both GM and PM...
If your in game name was [GM]Pro4Never[PM], the [PM] would be the status "tag?", and the first [GM] would just be a part of your character name. :-)
He's just joking around.

It's in reference to horribly written sources that check your permission based on a tag in your name versus a proper enumerated value to handle player permissions (banned, player, moderator, gm, pm, donator, etcetc). You can then handle all commands, features and such through a single value.
pro4never is offline  
Old 03/07/2013, 00:40   #19
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
you should check players Depending on their Account state not their Name
shadowman123 is offline  
Old 03/07/2013, 09:34   #20
 
elite*gold: 0
Join Date: Mar 2013
Posts: 44
Received Thanks: 2
Well, anyways... I still haven't figured out this error

Code:
The name "Cmd" does not exist in the current context

Here is an example where the error comes:
Code:
case "/robot":
                    {
                        string Account = "";
                        string Name = Cmd[1];

                        if (Game.World.CharacterFromName(Name) == null)
                        {
                            Game.Robot R = Database.LoadAsRobot(Name, ref Account);
                            if (R != null)
                                R.Init(Account);
                        }
                        return true;
                    }
On the
Code:
string Name = Cmd[1];
, i have the error on "Cmd" does not exist..
Could someone please help me out? :-)
xScylez is offline  
Old 03/07/2013, 14:33   #21
 
elite*gold: 0
Join Date: Feb 2013
Posts: 51
Received Thanks: 22
Quote:
Originally Posted by xScylez View Post
Well, anyways... I still haven't figured out this error

Code:
The name "Cmd" does not exist in the current context
On the
Code:
string Name = Cmd[1];
, i have the error on "Cmd" does not exist..
Could someone please help me out? :-)
string[] Cmd = Message.Split(' ');
EgyptianMano is offline  
Old 03/07/2013, 18:47   #22
 
elite*gold: 0
Join Date: Mar 2013
Posts: 44
Received Thanks: 2
Quote:
Originally Posted by EgyptianMano View Post
string[] Cmd = Message.Split(' ');
Thanks! Well, it removes the Cmd error, but then i get a error:
Code:
The name 'Message' does not exist in the current context
xScylez is offline  
Old 03/07/2013, 19:14   #23
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
It's obvious you don't have a clue what you're doing and should not be trying to modify whatever source this is. You need to start a lot smaller than a Conquer server and learn the basics of programming.
nTL3fTy is offline  
Thanks
1 User
Old 03/07/2013, 19:51   #24
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,379
Quote:
Originally Posted by nTL3fTy View Post
It's obvious you don't have a clue what you're doing and should not be trying to modify whatever source this is. You need to start a lot smaller than a Conquer server and learn the basics of programming.
+1

I already explained this all to him via PM. Learn the absolute basics of programming before anything else.
pro4never is offline  
Old 03/07/2013, 20:02   #25
 
elite*gold: 0
Join Date: Mar 2013
Posts: 44
Received Thanks: 2
well, it may be that is true! But anyways, i am making this for having fun with friends, and see how coding works and stuff..
Had 94 errors, stuck with 4 left, and all of them are this code:
Code:
string[] Cmd = Message.Split(' ');
Code:
The name 'Message' does not exist in the current context
xScylez is offline  
Old 03/07/2013, 22:26   #26
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 920
Quote:
Originally Posted by xScylez View Post
well, it may be that is true! But anyways, i am making this for having fun with friends, and see how coding works and stuff..
Had 94 errors, stuck with 4 left, and all of them are this code:
Code:
string[] Cmd = Message.Split(' ');
Code:
The name 'Message' does not exist in the current context
You aren't really seeing how code works at all, because fixing this teeters on common sense.

You don't have a variable named Message in the scope of where you're using it.
Lateralus is offline  
Old 03/07/2013, 23:32   #27
 
elite*gold: 0
Join Date: Mar 2013
Posts: 44
Received Thanks: 2
Quote:
Originally Posted by Lateralus View Post
You aren't really seeing how code works at all, because fixing this teeters on common sense.

You don't have a variable named Message in the scope of where you're using it.
Hmm, so in this case:

Code:
case "/robot":
                    {
                        string Account = "";
                        string Name = Cmd[1];

                        if (Game.World.CharacterFromName(Name) == null)
                        {
                            Game.Robot R = Database.LoadAsRobot(Name, ref Account);
                            if (R != null)
                                R.Init(Account);
                        }
                        return true;
                    }
The error is at Cmd, when i add the code, i get error at message..

Should it be like this then:
Code:
case "/robot":
                    {
                        string[] Cmd;
                        string Account = "";
                        string Name = Cmd[1];

                        if (Game.World.CharacterFromName(Name) == null)
                        {
                            Game.Robot R = Database.LoadAsRobot(Name, ref Account);
                            if (R != null)
                                R.Init(Account);
                        }
                        return true;
                    }
or will the code
Code:
string[] Cmd;
ruin it?
xScylez is offline  
Old 03/07/2013, 23:57   #28
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,379
Quote:
Originally Posted by xScylez View Post
Hmm, so in this case:

Code:
case "/robot":
                    {
                        string Account = "";
                        string Name = Cmd[1];

                        if (Game.World.CharacterFromName(Name) == null)
                        {
                            Game.Robot R = Database.LoadAsRobot(Name, ref Account);
                            if (R != null)
                                R.Init(Account);
                        }
                        return true;
                    }
The error is at Cmd, when i add the code, i get error at message..

Should it be like this then:
Code:
case "/robot":
                    {
                        string[] Cmd;
                        string Account = "";
                        string Name = Cmd[1];

                        if (Game.World.CharacterFromName(Name) == null)
                        {
                            Game.Robot R = Database.LoadAsRobot(Name, ref Account);
                            if (R != null)
                                R.Init(Account);
                        }
                        return true;
                    }
or will the code
Code:
string[] Cmd;
ruin it?

We've answered this for you like 5 times...


In the context of this thread, Message is a string (text) variable holding a chat message that the player has sent.

Msg is referring to a .Split version of the Message string (stored as an array of strings)

your errors are literally saying that "You never declared a variable called Msg and now you're trying to use it. What is it, what does it contain!?"



So yes... look at the very top of your switch statement and you'll see what your source calls the chat command being processed (split or otherwise)

You now know what the variable is called and can fix your broken-ass code to reference the right variable. 0 errors as they are all the same problem..
pro4never is offline  
Old 03/08/2013, 00:26   #29
 
elite*gold: 0
Join Date: Mar 2013
Posts: 44
Received Thanks: 2
Quote:
Originally Posted by pro4never View Post
We've answered this for you like 5 times...


In the context of this thread, Message is a string (text) variable holding a chat message that the player has sent.

Msg is referring to a .Split version of the Message string (stored as an array of strings)

your errors are literally saying that "You never declared a variable called Msg and now you're trying to use it. What is it, what does it contain!?"



So yes... look at the very top of your switch statement and you'll see what your source calls the chat command being processed (split or otherwise)

You now know what the variable is called and can fix your broken-ass code to reference the right variable. 0 errors as they are all the same problem..
WOOOAAH! I don't understand what i'm doing wrong
Have been trying to remove the "Message" error for an hour now :/
xScylez is offline  
Old 03/08/2013, 05:12   #30
 
lostsolder05's Avatar
 
elite*gold: 20
Join Date: Jan 2006
Posts: 890
Received Thanks: 241
Quote:
Originally Posted by xScylez View Post
WOOOAAH! I don't understand what i'm doing wrong
Have been trying to remove the "Message" error for an hour now :/
public static bool PmandGMCommand(Main.GameClient GC, string[] Msg)
{
string[] Cmd = Message.Split(' ');

Message is undeclared you're using Msg in your bool...
lostsolder05 is offline  
Reply

Tags
.cs, 5165, chat, conquer, organized


Similar Threads Similar Threads
Get the Section organized.
07/14/2013 - Need for Speed World - 37 Replies
Hello everyone. I would like to ask you all, what do you think about getting the section divided in two; so that we could have a Main section, to discuss about the game, have general questions and so on, and a Hacks sub-section in which we can have just releases there? I have been thinking about this, to get everything even more centralized, as well, we could avoid double posts/malware/spam in general. So any comments, leave them below, and definitely, vote.
Elo boost service the best, fast and most organized
01/29/2013 - League of Legends Trading - 5 Replies
Hi, we are 3 players from 2.3 , 2.1, and 2,05k elo we are starting to boost we already boosted not for money, just a few friends it worked now they are at 1600 elo. First of all this are our prices are all negociable 0 -1250 10 € per 100 elo 1250-1400 15 € per 100 elo 1400-1600 20 € per 100 elo
(request) chat filter
12/01/2009 - GunZ - 0 Replies
i've looked all over and all i want it just the chat filter. does anyone have just the chat filter?



All times are GMT +1. The time now is 15:46.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.