|
You last visited: Today at 06:24
Advertisement
[Urgent] Attention to anyone using LOFT Source
Discussion on [Urgent] Attention to anyone using LOFT Source within the CO2 Private Server forum part of the Conquer Online 2 category.
09/23/2008, 00:19
|
#16
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by THE BAT
The problem is not in LOTF Database code, you are true the code had one problem, but i fix it, i trace the code, but the problem is in the MySQL .NET Connector, and there are alot of people post it in the mySql forums, the thing is the problem happen randomly
|
Thats why you reconnect every so often...
|
|
|
09/23/2008, 00:25
|
#17
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
|
Quote:
Originally Posted by THE BAT
The problem is not in LOTF Database code, you are true the code had one problem, but i fix it, i trace the code, but the problem is in the MySQL .NET Connector, and there are alot of people post it in the mySql forums, the thing is the problem happen randomly
|
**** right Add me on msn!
|
|
|
09/23/2008, 01:55
|
#18
|
elite*gold: 0
Join Date: Aug 2006
Posts: 63
Received Thanks: 28
|
Quote:
Originally Posted by lolmaster123
**** right Add me on msn!

|
done
|
|
|
09/23/2008, 03:54
|
#19
|
elite*gold: 0
Join Date: Mar 2008
Posts: 62
Received Thanks: 6
|
Quote:
Originally Posted by THE BAT
The server is working very fine from more than 15 hours now, without any problem
Here is my old GetCharInfo, i added some changes to it, in trying to stop losing chars, but the problem is with the MySQL .NET Connector, even with the latest version of it (5.2.3)
Code:
public static void GetCharInfo(Character Charr, string UserName)
{
try
{
MySqlDataAdapter DataAdapter = null;
DataSet DSet = new DataSet();
DataAdapter = new MySqlDataAdapter("SELECT * FROM `Characters` WHERE `Account` = '" + UserName + "'", Connection);
DataAdapter.Fill(DSet, "Character");
if (DSet != null && DSet.Tables["Character"].Rows.Count > 0)
{
DataRow DR = DSet.Tables["Character"].Rows[0];
Charr.UID = (uint)DR["UID"];
Charr.Name = (string)DR["CharName"];
Charr.Spouse = (string)DR["Spouse"];
Charr.Job = Convert.ToByte((uint)DR["Job"]);
Charr.Level = Convert.ToByte((uint)DR["Level"]);
Charr.Exp = (uint)DR["Exp"];
Charr.Model = Convert.ToUInt16((uint)DR["Model"]);
Charr.Avatar = Convert.ToUInt16((uint)DR["Avatar"]);
Charr.Hair = Convert.ToUInt16((uint)DR["Hair"]);
Charr.LocX = Convert.ToUInt16((uint)DR["LocationX"]);
Charr.LocY = Convert.ToUInt16((uint)DR["LocationY"]);
Charr.LocMap = Convert.ToUInt16((uint)DR["LocationMap"]);
Charr.Str = Convert.ToUInt16((uint)DR["Strength"]);
Charr.Agi = Convert.ToUInt16((uint)DR["Agility"]);
Charr.Vit = Convert.ToUInt16((uint)DR["Vitality"]);
Charr.Spi = Convert.ToUInt16((uint)DR["Spirit"]);
Charr.Silvers = (uint)DR["Money"];
Charr.CPs = (uint)DR["CPs"];
Charr.CurHP = Convert.ToUInt16((uint)DR["CurrentHP"]);
Charr.CurMP = Convert.ToUInt16((uint)DR["CurrentMP"]);
Charr.PKPoints = Convert.ToUInt16((uint)DR["PKPoints"]);
Charr.RBCount = Convert.ToByte((uint)DR["RBCount"]);
Charr.PackedInventory = (string)DR["Inventory"];
Charr.PackedEquips = (string)DR["Equipment"];
Charr.PackedSkills = (string)DR["Skills"];
Charr.PackedProfs = (string)DR["Profs"];
Charr.WHSilvers = (uint)DR["WHMoney"];
Charr.PackedWHs = (string)DR["Warehouses"];
Charr.PackedFriends = (string)DR["Friends"];
Charr.PackedEnemies = (string)DR["Enemies"];
Charr.VP = (uint)DR["VP"];
Charr.GuildDonation = (uint)DR["GuildDonation"];
Charr.GuildID = Convert.ToUInt16((uint)DR["MyGuild"]);
Charr.GuildPosition = Convert.ToByte((uint)DR["GuildPos"]);
Charr.PrevMap = Convert.ToUInt16((uint)DR["PrevMap"]);
if (Guilds.AllGuilds.ContainsKey(Charr.GuildID))
Charr.MyGuild = Guilds.AllGuilds[Charr.GuildID];
Charr.MinAtk = Charr.Str;
Charr.MaxAtk = Charr.Str;
Charr.Potency = Charr.Level;
Charr.RealModel = Charr.Model;
Charr.RealAvatar = Charr.Avatar;
Charr.MaxHP = Charr.BaseMaxHP();
Charr.MaxMP = Charr.MaxMana();
Charr.RealAgi = Charr.Agi;
Charr.KO = Convert.ToUInt16((uint)DR["KO"]);
Charr.OldKO = Convert.ToUInt16((uint)DR["OldKO"]);
}
else
{
General.WriteLine("Char not found.");
throw new Exception();
}
}
catch (Exception Exc)
{
Charr = null;
throw Exc;
}
}
i can give your the modified Database class to work with MS SQL Server, if you want
|
omg 15 hours :O very nice i need it too
|
|
|
09/23/2008, 04:00
|
#20
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by pegaeu
omg 15 hours :O very nice i need it too
|
Mine works for 15 hours using MySQL, it doesn't take a genius....
|
|
|
09/23/2008, 13:39
|
#21
|
elite*gold: 0
Join Date: May 2007
Posts: 1,195
Received Thanks: 457
|
Haha...
/Agreed mine is working too (well for 12 hours  )
|
|
|
09/23/2008, 14:36
|
#22
|
elite*gold: 20
Join Date: Jan 2006
Posts: 890
Received Thanks: 241
|
Quote:
Originally Posted by tao4229
Mine works for 15 hours using MySQL, it doesn't take a genius....
|
ye... mine will work for over 24 hrs str8 with mysql... lol
|
|
|
09/23/2008, 14:42
|
#23
|
elite*gold: 0
Join Date: May 2007
Posts: 1,195
Received Thanks: 457
|
You actually don't understand -_-
|
|
|
09/23/2008, 23:50
|
#24
|
elite*gold: 0
Join Date: Nov 2007
Posts: 306
Received Thanks: 75
|
too many long command strings will over load mysql, this is true.. but if you set a quick function up to go off every hour or so, and null out Connection and then reconnect it to MySql, you can stop this problem from happening.
|
|
|
09/24/2008, 00:49
|
#25
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by Rechocto
too many long command strings will over load mysql, this is true.. but if you set a quick function up to go off every hour or so, and null out Connection and then reconnect it to MySql, you can stop this problem from happening.
|
Mine reconnects every like 5 minutes ._. Maybe a wee bit excessive :]
|
|
|
09/24/2008, 07:16
|
#26
|
elite*gold: 0
Join Date: Feb 2008
Posts: 277
Received Thanks: 52
|
Quote:
Originally Posted by THE BAT
The MySQL .NET Connector has a bug, its not happen always, but it happen like 3 or 4 times a day, i search the MySQL Knowledge base and some report that bug too.
look at the errors:
Code:
MySql.Data.MySqlClient.MySqlException: Duplicate entry '' for key 1
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
Code:
System.ArgumentException: Column 'UID' does not belong to table Character.
at System.Data.DataRow.GetDataColumn(String columnName)
at System.Data.DataRow.get_Item(String columnName)
i suggest if you are planning to release your server to public, move to another database server like SQL Server.
cuz when that problem happen, some character information replace with 0 in the database
|
1. MySql.Data.MySqlClient.MySqlException: Duplicate entry 'character name' for key 1
How i fixed it: In the accounts column look at charr and replace it with the correct character name. One thing that happens when using /changename. Changes the name in the character column but not the one in the accounts column. Result: that above comes up on the console.....
2. Thats fucked up o.0 never seen that
|
|
|
09/25/2008, 17:35
|
#27
|
elite*gold: 0
Join Date: Aug 2006
Posts: 63
Received Thanks: 28
|
Anyway i will stay with SQL Server
Quote:
Security remains a major concern for most businesses and a compelling consideration in choosing a database system.
Both DBMS support security at the base level. MySQL is limited to supporting basic security at the table level, via the SQL command. By contrast, SQL server fully supports security at the column level.
Another important consideration is security certificates - the verification of the database security by a third party. SQL Server has been certified as C-2 compliant, which means the database system has adequate security for government applications. MySQL has no such certification.
Moving on to more advanced features of protecting data on the database, the SQL Server 2005 have implemented more advanced authentication and authorisation features.
|
Quote:
SQL Server is more failsafe and less prone to data corruption. SQL has a robust checkpoint mechanism whereby the data passes from the keyboard to the hard drive before showing in the monitor. Even if the databases shut down unexpectedly without warning, the data can be recovered.
New features in the SQL 2005 release provide enhanced mechanisms to manage data protection and rapid restoration. Mirrored backups allow you to create multiple copies of the backup file. These backups have identical content, so you can always mix the files in case one of the sets becomes corrupt.
Copy only backups enable you to make a copy of the database without interrupting the sequence of other backup files. This copy can be used to restore your database, instead of going through the full backup and translation log. You can also save time by using partial backups for all filegroups, except those marked as read-only.
MySQL falls short in recovery with its default MyISAM mechanism. The UPS assumes uninterrupted data, and in the event of an unexpected shutdown your data can be lost and the data store corrupted.
|
|
|
|
09/26/2008, 12:51
|
#28
|
elite*gold: 0
Join Date: Nov 2007
Posts: 306
Received Thanks: 75
|
wow they made a few SIMPLE additions to MySql, and they have to write all that trying to hype it up?
|
|
|
 |
|
Similar Threads
|
[HeLP]LOFT Source
08/21/2009 - CO2 Private Server - 9 Replies
salvation can someone give me the id of the effect of NPC, and someone can give me the code for revive guard .(LOFT Source.)
thx
|
How to work as a pro on LOFT source!
07/29/2009 - CO2 Private Server - 34 Replies
Hello people! My first time helping you guys,and I think i deserve a thanks after this. Anyways,here it goes. This is what I will teach you through this guide
*Setting up the server
*Adding accounts
*Adding monsters
*Adding NPCs
*Adding monsterspawns ( Will share an exclusive command that I created )
*Remove monsters
*Edit monsters
|
How to work the LOFT source as a pro!
07/17/2009 - CO2 Private Server - 116 Replies
Hello people! My first time helping you guys,and I think i deserve a thanks after this. Anyways,here it goes. This is what I will teach you through this guide
*Setting up the server
*Adding accounts
*Adding monsters
*Adding NPCs
*Adding monsterspawns ( Will share an exclusive command that I created )
*Remove monsters
*Edit monsters
|
Need the best loft source
04/20/2009 - CO2 Private Server - 1 Replies
Please i need the best loft source with the all necesary to play who can get me? link etc?
|
Request the best LOFT source
04/15/2009 - CO2 Private Server - 5 Replies
hey guys i dont know what source to use...i am confused idk whats the best source help me
|
All times are GMT +1. The time now is 06:24.
|
|