Register for your free account! | Forgot your password?

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

  • 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/09/2013, 17:55   #46
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
Quote:
Originally Posted by nTL3fTy View Post
?
?
?
?
?
?
?
?
?
?

i duno how this is related to what i was talking about , but maybe you mean that i should use tryparse instead of converting or parse so incase it failed it return a bool ?

when system convert return error it break the try block and does not set the bool to true
when the try parse fails it return false
same result ?

so instead of ONE try catch block i create THIRTY if/else with tryparse ?

try
{
switch
{
case when fail does not set the value to true
case when fail does not set the value to true
case when fail does not set the value to true
}
}
catch
{

}

but with try parse

switch
{
case
if(try parse){}
else{}

case
if(try parse){}
else{}

case
if(try parse){}
else{}

case
if(try parse){}
else{}

case
if(try parse){}
else{}

case
if(try parse){}
else{}

case
if(try parse){}
else{}

}


i don't think tryparse is better here , don't you think ?
i need that error to inform me that im doing something wrong and set the whole method to false , tryparse won't give me that error so ill need to handle it on each case , got my point ?
go for it is offline  
Thanks
1 User
Old 03/09/2013, 20:24   #47
 
lostsolder05's Avatar
 
elite*gold: 20
Join Date: Jan 2006
Posts: 890
Received Thanks: 241
Quote:
Originally Posted by go for it View Post
i duno how this is related to what i was talking about , but maybe you mean that i should use tryparse instead of converting or parse so incase it failed it return a bool ?

when system convert return error it break the try block and does not set the bool to true
when the try parse fails it return false
same result ?

so instead of ONE try catch block i create THIRTY if/else with tryparse ?


i don't think tryparse is better here , don't you think ?
i need that error to inform me that im doing something wrong and set the whole method to false , tryparse won't give me that error so ill need to handle it on each case , got my point ?
TryParse is implemented without exceptions therefore it run's a lot faster... Did I mention it works as a bool? The only time you use a try/catch is when absolutely necessary you're not suppose to go throwing them everywhere you can.

@Arco Regardless of the poor example my point stands.
lostsolder05 is offline  
Old 03/09/2013, 20:30   #48
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
Quote:
Originally Posted by lostsolder05 View Post
TryParse is implemented without exceptions therefore it run's a lot faster... Did I mention it works as a bool?

@Arco Regardless of the poor example my point stands.
how faster do you think it works ? does that milliseconds matters each time i type a command ?
as they say , if you care about cpu cycles then c# is definitely not for you

and nope you didn't but msdn did , but without using it as bool you won't even know if your conversion failed
which means that your code will be always true and it won't be bool which means you need to read what i said to acro in the very first post for me on this thread

edit:
as you edited your post i need to edit this one
Quote:
The only time you use a try/catch is when absolutely necessary you're not suppose to go throwing them everywhere you can.
well im not throwing them everywhere , but as i said in the prev. post "a try catch block in this example is way way way more efficient than a check on every case"

yes a try/catch block should not be used alot but in this example i think it's the easiest way to get it done
go for it is offline  
Thanks
1 User
Old 03/09/2013, 20:34   #49
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
It will only run milliseconds faster if that.

While it doesnt matter; it's good programming technique to make things as fast as possible.

Also - A try catch block ONLY causes a very small performance loss if an exception is actually thrown.
_DreadNought_ is offline  
Thanks
1 User
Old 03/09/2013, 21:21   #50
 
elite*gold: 0
Join Date: Mar 2013
Posts: 44
Received Thanks: 2
Quote:
Originally Posted by Fаng View Post
You know absolutely rats-*** about programming... and you're trying to maintain a private server? That sounds like a really bad idea to me. Aren't there already private servers out there that you can join and support?
That may be true, but i have a problem learning fast... I use time to learn :/ and is i said earlier, i am making this for me and some friends. :-)

EDIT: Got it fixed now... Oh my ***, how didn't i see it! It wasn't that hard after all xD Thanks all!
#Close Thread!
xScylez 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 07:41.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.