Register for your free account! | Forgot your password?

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

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

Advertisement



Guild deletion code error coemu...

Discussion on Guild deletion code error coemu... within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
Guild deletion code error coemu...

this codes written perfectly but i keep getting an error message...
Code:
        public static void DeleteGuild(int ID)
        {
            if (Nano.Guilds.ContainsKey(ID))
            {
                Struct.GuildInfo GuToDel = Nano.Guilds[ID];
                foreach (int ChId in GuToDel.GMems)
                {
                    try
                    {
                        MySqlCommand Cmd2 = new MySqlCommand("UPDATE `characters` SET `Guild` = " + 0 + ", `GRank` = " + 0 + ", `GDonation` = " + 0 + " WHERE `CharID` = " + ChId, DatabaseConnection.Connection);
                        Cmd2.ExecuteNonQuery();
                        Cmd2.Connection.Close();
                        Cmd2.Connection.Dispose();
                        Cmd2.Dispose();
                    }
                    catch
                    {
                        //Console.WriteLine("Character not exist anymore");
                    }
                }
                Nano.Guilds.Remove(ID);
            }
            MySqlCommand Cmd = new MySqlCommand("DELETE FROM `guilds` Where `GuildID` = " + ID + "", DatabaseConnection.Connection);
            Cmd.ExecuteNonQuery();// <--- comes up says data reader allready associated blh blh bullshit!
            Cmd.Connection.Close();
            Cmd.Connection.Dispose();
            Cmd.Dispose();
        }
Saying.
MySql Exception was Unhandled.
There is already an open DataReader associated with this Connection which must be closed first.

Any ideas?
LegalConquer is offline  
Reply


Similar Threads Similar Threads
WTB: Japanischer/Chinesicher Guild Wars Trial-Code und EoTn Code
02/08/2010 - Guild Wars Trading - 5 Replies
Hallo, Wie schon oben in der beschreibung steht suche ich Japanischer/Chinesicher Trial-Code + EoTn oder die einzelnen Codes! Ich würde in Platin/Ektos/ZkeYs zahlen (allerdings nur mit Treuhandhändler), man weiss ja nie was einem Verkauft wird :P. Bitte so schnell wie möglich melden, wen einer es haben sollte.
[Tutorial][For who can't Code] Code Simple NPC (CoEmu)
10/15/2009 - CO2 Private Server - 13 Replies
First i will release the npc and explain you alot of good things The npc Ok .. here is the npc jail in TwinCity (Enter the jail and go out the jail) in Handlers / NpcTalk.cs Search for default: { Text("NPC " + ID + "'s dialog is not coded.", CSocket);
[Help CoEmu V2] Lil help on a code
07/08/2009 - CO2 Private Server - 11 Replies
Im still new to this but im creating an npc and i want to learn how to let it show text based on your level like: Level 1 : Hello lvl 1 Level 2: Hello lvl 2 Level 3 : Hello lvl 3
[CoEmu] Guild War
07/02/2009 - CO2 Private Server - 12 Replies
i need to know how to make guild war work in CoEmu v2 i hope some can let me know how
Npc code help - CoEmu v2
06/14/2009 - CO2 Private Server - 6 Replies
This is just a nooby release for the Hairstyler npc and for hairdyes I just got working, I will add more on here as I finish them, be gentle this is my first release :). //Edit: Changed the title since I got it finished/fixed it myself Add in this block of code somewhere in NpcTalk.cs Now to add Hairdyes, go to UseItem.cs and add this block of code. That's all I have to offer at the moment sorry, I been kinda busy lately.



All times are GMT +1. The time now is 23:33.


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.