Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 02:53

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

Advertisement



Programming For Idiots (Tutorial) - In C#

Discussion on Programming For Idiots (Tutorial) - In C# within the CO2 Programming forum part of the Conquer Online 2 category.

Closed Thread
 
Old 07/12/2008, 18:17   #46
 
elite*gold: 0
Join Date: Jun 2007
Posts: 257
Received Thanks: 42
I got WinXP Pro Essential, it came with all the video codecs to view this
IHateHomos is offline  
Old 07/12/2008, 19:29   #47
 
elite*gold: 0
Join Date: Jul 2008
Posts: 13
Received Thanks: 0
I have something amazing. It is called Winamp.

>.>
Exqui is offline  
Old 07/12/2008, 19:40   #48

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Quote:
Originally Posted by Exqui View Post
I have something amazing. It is called Winamp.

>.>
Seriously never heard of that before, I gonne downlaod it and try it
Kiyono is offline  
Old 07/12/2008, 20:13   #49
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Quote:
Originally Posted by IHateHomos View Post
He said he's running his private server off of ini files XD!!!!!!!

Now. What is an ini file?

An initialization file, which is used by an application to store configuration data that is read as the program is starting.

And he plans on basing a whole server off of ini files? XD
As stated before seriously, what hadeset did with INI's sucks. Nobody knows how to optimize INI's far enough to make it work or at least compensate for what MySQL provides other than myself (or at least, I don't know anyone else who can).
InfamousNoone is offline  
Thanks
1 User
Old 07/13/2008, 08:50   #50
 
scottdavey's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 684
Received Thanks: 238
Quote:
Originally Posted by InfamousNoone View Post
If anyone has any questions at programming feel free to ask; if your going to be stupid and ask something like "how do I make guilds?" I'm not going to bother responding. Please ask something SPECIFIC.

For instance; "How would I implement an IP Ban feature?", "How does ______ work?", etc.

Keep in mind, you question could both be about conquer programming, or general programming, anything thats not currently public won't be released from me (i.e. how do I decrypt password hex dumps? Won't be answered because the knowledge isn't public).
Hey on my server, I'm trying to load a timer interval from a .ini file but i keep getting the same error..

i never usually have problems like this but this is taking the piss, I've only been doing c# a few months,

Code:
Cannot implicitly convert type 'string' to 'double'
errored line:
Code:
            restart.Interval = RestartTime;
This is the stuff
Code:
                Ini server_ = new Ini(System.Windows.Forms.Application.StartupPath + @"server.ini");
                RestartTime = server_.ReadValue(Convert.ToString("Server"), "restart");
scottdavey is offline  
Old 07/13/2008, 11:56   #51
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,001
Change this :

Code:
Ini server_ = new Ini(System.Windows.Forms.Application.StartupPath + @"server.ini");
RestartTime = server_.ReadValue(Convert.ToString("Server"), "restart");
To

Code:
Ini server_ = new Ini(System.Windows.Forms.Application.StartupPath + @"server.ini");
RestartTime = Convert.ToDouble(server_.ReadValue(Convert.ToString("Server"), "restart"));
But isn't the standard timers interval integer, not double?

Also you could try something like...
Code:
 public double ReadDouble(string Section, string Key, double Default)
        {
            double res;
            if (double.TryParse(ReadValue(Section, Key), out res))
                return res;
            return Default;               
        }
tanelipe is offline  
Old 07/13/2008, 14:39   #52

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
So is there a way to fix the problem with voice being to fast?
Kiyono is offline  
Old 07/13/2008, 17:57   #53
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Rewind and listen again :P


@Tane:
double.Parse is faster than Convert.ToDouble
InfamousNoone is offline  
Thanks
1 User
Old 07/13/2008, 19:28   #54
 
scottdavey's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 684
Received Thanks: 238
Quote:
Originally Posted by tanelipe View Post
Change this :

Code:
Ini server_ = new Ini(System.Windows.Forms.Application.StartupPath + @"server.ini");
RestartTime = server_.ReadValue(Convert.ToString("Server"), "restart");
To

Code:
Ini server_ = new Ini(System.Windows.Forms.Application.StartupPath + @"server.ini");
RestartTime = Convert.ToDouble(server_.ReadValue(Convert.ToString("Server"), "restart"));
But isn't the standard timers interval integer, not double?

Also you could try something like...
Code:
 public double ReadDouble(string Section, string Key, double Default)
        {
            double res;
            if (double.TryParse(ReadValue(Section, Key), out res))
                return res;
            return Default;               
        }
I get that error twice now, thanks for trying anyway
scottdavey is offline  
Old 07/13/2008, 22:46   #55
 
hio77's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 1,759
Received Thanks: 827
these videos are very helpfull keep it up lol
hio77 is offline  
Old 07/15/2008, 00:04   #56
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Added a guide on socket programming for client and server (over tcp), hoorah.
InfamousNoone is offline  
Thanks
1 User
Old 07/15/2008, 03:22   #57
 
hio77's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 1,759
Received Thanks: 827
they are getting better and better keep it up!!
hio77 is offline  
Old 07/15/2008, 03:29   #58
 
Ninja1337's Avatar
 
elite*gold: 0
Join Date: Apr 2007
Posts: 964
Received Thanks: 330
Well i got question i wann know if we start with this tut can we for example be able to crack an program ex: isrobot or tbot ( Bots For Silkroad Online)

Edit: i got problem with Videos i can just hear voice but i cant see videoit is like song file idk why
im playing them with windows media player or divx player
Ninja1337 is offline  
Old 07/15/2008, 03:54   #59
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Well in my latest lesson I provide a sample of my "System.NativeInterop" DLL which'll be continued out meaning users won't need to have knowledge of the CRT or native win32 api's. I'll get into messing with programs when I start doing lessons I declare "advanced".
InfamousNoone is offline  
Thanks
2 Users
Old 07/15/2008, 04:04   #60
 
scottdavey's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 684
Received Thanks: 238
You said at the start ask smart questions, And my question is exactly what you said.
How to create an IP ban function?
scottdavey is offline  
Closed Thread


Similar Threads Similar Threads
Programming for Idiots (Tutorial) C++
06/11/2012 - CO2 Programming - 20 Replies
Yeah, so in my relation to my C# one (http://www.elitepvpers.com/forum/co2-guides-templa tes/148675-programming-idiots-tutorial-c.html), which wasn't the best I felt I'll *try* make for it with this one. I've also got some spare time in between school, from when exams start, and a new Warlords server comes out... so yeah. Right, so before I post any links to the videos I'd like to point out, so I don't get bitched at by people saying, "this isn't real C++", most of the things I do will be...
[RE-OPENING]"Programming For Idiots (Tutorial) - In C#"
09/17/2009 - CO2 Programming - 20 Replies
At start i want to say THIS IS NOT MY GUIDE , GUIDE WAS MADE BY INFAMOUSNONE!!



All times are GMT +1. The time now is 02:54.


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.