Register for your free account! | Forgot your password?

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

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

Advertisement



Progress!...But wait...

Discussion on Progress!...But wait... within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
bryce16's Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 47
Received Thanks: 3
Red face Progress!...But wait...

I managed to fix up the connections inbound/outbound throughout my learning project and a few other things I learned from this forum so +1 for epvp xd
Anyway, I'm stuck on newb-mode at the moment and I can't seem to find the solution for this very common-yet annoying error located in the KillConnection file. It's quite large but I'll post it here anyway, This isn't my work. Credit goes to the original coder of this file. I simply need assistance in obtaining the solution.
Code:
using System;
using System.Data;
using MySql.Data.MySqlClient;
using System.Collections.Generic;

public class KillConnections
{
    public static void Kill()
    {
        string command = "SHOW processlist";
        List<ulong> processes = new List<ulong>();

        MySqlConnection conn = new MySqlConnection(MySqlCmd.ConnectionString);
        MySqlCommand cmd = new MySqlCommand(command, conn);
        MySqlDataReader reader = null;

        try
        {
            conn.Open();
            reader = cmd.ExecuteReader();
            while (reader.Read())
            {
                ulong identity = ulong.Parse(reader["Id"].ToString());
                if (reader["Command"].ToString() == "Sleep"
                                    && uint.Parse(reader["Time"].ToString()) >= conn.ConnectionTimeout
                                    && identity > 0)
                    processes.Add(identity);
            }
            reader.Close();
            reader.Dispose();
            reader = null;

            foreach (int identity in processes)
            {
                command = "KILL " + identity;
                cmd.CommandText = command;
                cmd.ExecuteNonQuery();
            }
            cmd.Dispose();
            cmd = null;
        }

        catch (Exception e)
        {
            Console.WriteLine(e);
        }

        finally
        {
            if (reader != null && !reader.IsClosed)
            {
                reader.Close();
                reader.Dispose();
                reader = null;
            }
            if (conn != null && conn.State == ConnectionState.Open)
            {
                conn.Close();
                conn.Dispose();
            }
            if (cmd != null)
            {
                cmd.Dispose();
                cmd = null;
            }
        }
    }
}
Code:
Error	 1: The name 'MySqlCmd' does not exist in the current context
bryce16 is offline  
Old 03/28/2012, 02:35   #2
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,192
I'm the original coder. Basically, I created that for my Project Kibou source. You need to implement it into your source. In other words, you need to know enough about your source to convert it to work with your methods. Good luck!
Spirited is offline  
Old 03/28/2012, 03:00   #3
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by Fаng View Post
I'm the original coder. Basically, I created that for my Project Kibou source. You need to implement it into your source. In other words, you need to know enough about your source to convert it to work with your methods. Good luck!
well in The Source im using it contained this KillConnection Class and handled but the question is what does it do actualy ?
shadowman123 is offline  
Old 03/28/2012, 04:09   #4
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,192
Quote:
Originally Posted by shadowman123 View Post
well in The Source im using it contained this KillConnection Class and handled but the question is what does it do actualy ?
Look up what a sleeping sql connection is.
Spirited is offline  
Old 03/29/2012, 00:49   #5
 
bryce16's Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 47
Received Thanks: 3
Successfully converted. =p
#Request Closed
bryce16 is offline  
Reply


Similar Threads Similar Threads
We all wait 7.3 gs
03/11/2012 - Rappelz Private Server - 7 Replies
So Xijezu Or ISmokeDrow All are waiting For GameServer 7.3 Can u give it for all ? Because AnyWay Some get it release here! Maybe this process be faster now!!!!
All Hack don't work. We must wait, Just wait
04/16/2011 - CrossFire Hacks, Bots, Cheats & Exploits - 3 Replies
All Hack don't work. We must wait, Just wait but its nothing xD Big FAKE !!!!!
PLEASE HELP I CAN`T WAIT
09/17/2010 - Metin2 - 8 Replies
Hello everyone. I need a hack for meitn2 us . I just want multihack and skill dmg hack for metin2us because i tried skill dmg hack on metin2 us and it doesn`t work, and then i tried skill dmg hack on metin2uk and it work. Thank you very much.



All times are GMT +1. The time now is 10:38.


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.