Register for your free account! | Forgot your password?

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

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

Advertisement



[HELP]Problem in SaveChar

Discussion on [HELP]Problem in SaveChar within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2007
Posts: 12
Received Thanks: 0
Question [HELP]Problem in SaveChar

i have this in DataBase.cs Ln:1373 to ln:1388:
Code:
public static void SaveChar(Character Charr)
        {
            try
            {
                Charr.PackInventory();
                Charr.PackEquips();
                Charr.PackSkills();
                Charr.PackProfs();
                Charr.PackWarehouses();
                Charr.PackEnemies();
                Charr.PackFriends();

                MySqlCommand Command = new MySqlCommand("UPDATE `Characters` SET `CharName` = '" + Charr.Name + "', `Level` = " + Charr.Level + ",`Exp` = " + Charr.Exp + ",`GuildDonation` = " + Charr.GuildDonation + ",`Strength` = " + Charr.Str + ",`Agility` = " + Charr.Agi + ",`Vitality` = " + Charr.Vit + ",`Spirit` = " + Charr.Spi + ",`Job` = " + Charr.Job + ",`Model` = " + Charr.Model + ",`Money` = " + Charr.Silvers + ",`CPs` = " + Charr.CPs + ",`CurrentHP` = " + Charr.CurHP + ",`StatPoints` = " + Charr.StatP + ",`MyGuild` = " + Charr.GuildID + ",`GuildPos` = " + Charr.GuildPosition + ",`LocationMap` = " + Charr.LocMap + ",`LocationX` = " + Charr.LocX + ",`LocationY` = " + Charr.LocY + ",`Hair` = " + Charr.Hair + ",`Equipment` = '" + Charr.PackedEquips + "',`Inventory` = '" + Charr.PackedInventory + "',`PKPoints` = " + Charr.PKPoints + ",`PrevMap` = " + Charr.PrevMap + ", `Skills` = '" + Charr.PackedSkills + "', `Profs` = '" + Charr.PackedProfs + "',`RBCount` = " + Charr.RBCount + ",`Avatar` = " + Charr.Avatar + ",`WHMoney` = " + Charr.WHSilvers + ",`VP` = " + Charr.VP + ",`Warehouses` = '" + Charr.PackedWHs + "',`Friends` = '" + Charr.PackedFriends + "',`Enemies` = '" + Charr.PackedEnemies + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
                Command.ExecuteNonQuery();

            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
and in my console why i this text:
Code:
System.InvalidOperationException: Connection must be valid and open
at Mysql.Data.Mysqlclient.MysqlCommand.checkstate<>
at mysql.data.mysqlclient.mysqlcommand.executenonquer y<>
at CoServer_project.Database.saveChar<Character Charr> in ... database.cs:line 1386
this problem don't save Characters... if online...

can you help me?
tks
silvestre is offline  
Old 09/09/2008, 16:39   #2
 
elite*gold: 0
Join Date: Aug 2006
Posts: 227
Received Thanks: 57
System.InvalidOperationException: Connection must be valid and open
Says

Connection is not open or dont exit more dont to say
keving is offline  
Old 09/09/2008, 18:44   #3
 
elite*gold: 0
Join Date: Apr 2007
Posts: 12
Received Thanks: 0
ok but the Code is correct... i don't understand why?!?!

tks
silvestre is offline  
Old 09/10/2008, 00:59   #4
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Both of you can't speak english, keving you're an idiot, DURR THE THING SAYS CONNECTION MUST BE OPEN, SO IT'S OBVIOUSLY NOT OPEN >.>

DataBase.cs is coded like ****. It takes some major fixing that I'm still trying to work out..
tao4229 is offline  
Reply

« C++ coders. | IDEA »

Similar Threads Similar Threads
[Problem] Problem with server starting - cannot find quest index for PaxHeader
12/22/2009 - Metin2 Private Server - 1 Replies
Hello! I have this same problem as here when i'm starting my server: http://www.elitepvpers.com/forum/metin2-pserver-di scussions-questions/307143-metin2-serverfiles-ques t-index-fehler.html But I didn't know the answer.. how to repair this? Greetings
[Help]SaveChar Problem
03/19/2009 - CO2 Private Server - 2 Replies
I think i got fixed my loggin freeze.. But now like 10min everything is allright.. and i wait bit if somthing hapens.. I logg and then /dc my self, like 5 times then i start jumping and trying to kill and then i start getting errors that doesnt stop.. I hope that some one can help me with this



All times are GMT +2. The time now is 15:10.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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