Register for your free account! | Forgot your password?

You last visited: Today at 11:14

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


Console Error

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2009
Posts: 27
Received Thanks: 0
Console Error

Code:
MySql.Data.MySqlClient.MySqlException: Connection unexpectedly terminated ---> System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: count
   at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
   at MySql.Data.MySqlClient.PacketReader.Read(Byte[]& buffer, Int64 pos, Int64 len)
   --- End of inner exception stack trace ---
   at MySql.Data.MySqlClient.PacketReader.Read(Byte[]& buffer, Int64 pos, Int64 len)
   at MySql.Data.MySqlClient.PacketReader.ReadString(Int64 length)
   at MySql.Data.MySqlClient.NativeDriver.ReadResult(Int64& affectedRows, Int64& lastInsertId)
   at MySql.Data.MySqlClient.CommandResult.ReadNextResult(Boolean isFirst)
   at MySql.Data.MySqlClient.CommandResult..ctor(Driver d, Boolean isBinary)
   at MySql.Data.MySqlClient.NativeDriver.SendQuery(Byte[] bytes, Int32 length, Boolean consume)
   at MySql.Data.MySqlClient.MySqlCommand.GetNextResultSet(MySqlDataReader reader)
   at MySql.Data.MySqlClient.MySqlCommand.Consume()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at COServer_Project.DataBase.SaveChar(Character Charr) in C:\Documents and Settings\YernaJ\Desktop\My Source\COServerProject\DataBase.cs:line 1728
System.InvalidOperationException: Connection must be valid and open
   at MySql.Data.MySqlClient.MySqlCommand.CheckState()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at COServer_Project.DataBase.SaveChar(Character Charr) in C:\Documents and Settings\YernaJ\Desktop\My Source\COServerProject\DataBase.cs:line 1728
System.InvalidOperationException: Connection must be valid and open
   at MySql.Data.MySqlClient.MySqlCommand.CheckState()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at COServer_Project.DataBase.SaveChar(Character Charr) in C:\Documents and Settings\YernaJ\Desktop\My Source\COServerProject\DataBase.cs:line 1728
what are the causes of that console error? Anyone can help? Thanks.



LetMeBeTheOne is offline  
Old 08/30/2009, 18:52   #2
 
elite*gold: 0
Join Date: Jul 2009
Posts: 27
Received Thanks: 0
someone can help me with this. thanks. sorry for double post.


LetMeBeTheOne is offline  
Old 08/30/2009, 19:06   #3
 
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
Well Go Look at the line its telling you which would be 1728 in database.cs
hunterman01 is offline  
Old 08/30/2009, 19:46   #4
 
elite*gold: 0
Join Date: Jul 2009
Posts: 27
Received Thanks: 0
its all about save chars. its Command.ExecuteNonQuery();


LetMeBeTheOne is offline  
Old 08/30/2009, 19:55   #5
 
elite*gold: 20
Join Date: Aug 2009
Posts: 1,344
Received Thanks: 650
Upload the source and I'll help you out.
Zion~ is offline  
Old 08/30/2009, 20:10   #6
 
elite*gold: 0
Join Date: Jul 2009
Posts: 27
Received Thanks: 0
Code:
MySqlCommand Command = new MySqlCommand("UPDATE `Characters` SET `CharName` = '" + Charr.Name + "',`Spouse` = '" + Charr.Spouse + "', `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.RealModel + ",`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 + "',`QuestKO` = '" + Charr.QuestKO + "',`QuestMob` = '" + Charr.QuestMob + "',`QuestFrom` = '" + Charr.QuestFrom + "',`Prize` = '" + Charr.Prize + "',`ClaimPrize` = '" + Charr.ClaimPrize + "',`LuckyTime` = '" + Charr.LuckTime + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
                Command.ExecuteNonQuery();
thats it..
LetMeBeTheOne is offline  
Old 08/30/2009, 20:14   #7
 
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
If you added heavensblessing make sure you put that in there and put it in mysql tables
hunterman01 is offline  
Old 08/30/2009, 21:01   #8
 
elite*gold: 0
Join Date: Sep 2007
Posts: 1,705
Received Thanks: 437
Connection must be valid and open
raidenx123 is offline  
Old 08/30/2009, 22:02   #9
 
elite*gold: 0
Join Date: Jul 2009
Posts: 27
Received Thanks: 0
dont have heaven bless. idk what is something wrong. i think i have to put AllowQuerys and DatabaseQueue?


LetMeBeTheOne is offline  
Reply



« [Help]Root Server | Is there any way to change CoEmu v2 5095 Super/DB drop rate? »

Similar Threads
GM Console Error?
05/23/2010 - SRO Foreign - Discussions / Questions - 10 Replies
Well to make it quick, i just enabled the gm console but when i type /camera it doest appear the box in the right that says next previous draw or whatever... and /warp doesnt work either for me :S
5165 console error
05/03/2010 - CO2 PServer - Discussions / Questions - 9 Replies
Hi, I am using raidens itemadd.ini, and when i open the project and debug, this happens: http://i43.tinypic.com/igiue0.jpg How can I fix this?
Console Error
03/04/2010 - CO2 PServer - Discussions / Questions - 0 Replies
could someone help me with this
Console Error!
02/28/2010 - CO2 PServer - Discussions / Questions - 1 Replies
I am running this server on VPS. This is what happens when I try to login: http://i47.tinypic.com/dbl74n.jpg How can I fix this?
[Help] Authenticate error in console
08/13/2009 - CO2 PServer - Discussions / Questions - 2 Replies
http://i783.photobucket.com/albums/yy117/archangelco08/imagembr7.jpg Can someone help me with this errors cause when this error comes out the character cant log in anymore when they got dc or they want to log in. Can someone help me with this errors... Thanks.



All times are GMT +1. The time now is 11:14.


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

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.