|
You last visited: Today at 00:25
Advertisement
[Help]Database.cs
Discussion on [Help]Database.cs within the CO2 Private Server forum part of the Conquer Online 2 category.
08/07/2010, 22:00
|
#1
|
elite*gold: 0
Join Date: Mar 2007
Posts: 130
Received Thanks: 9
|
[Help]Database.cs
aite so lately for some reason donation has not been saving and i was looking in the database.cs and i dont really see anything wrong with it unless u count adding that fix 100% code save characters lvl and all for 5165 thread made by memo1340
would that cause the problem any helpers plz help ill thanks u thousands of times ahahaha *****... well hook da homie up.... but yea foshow... any sugestions
|
|
|
08/07/2010, 22:43
|
#2
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
That save might be the problem. Was the donations saving before you added it? If so I would suggest removing it. I have not looked at this code myself as I have no need for it. But just try removing the 100% code save for all characters before you try anything else. If this doesn't solve the problem write back on this thread and we can try and work something out.
Also I don't know how much you know about C# (guess that's what you using) but look in the 100% save code thing and make sure it is saving donations properly.
|
|
|
08/08/2010, 19:38
|
#3
|
elite*gold: 0
Join Date: Mar 2007
Posts: 130
Received Thanks: 9
|
yea i didnt look at it i will right now lol brb
Code:
if (File.Exists("C:\\OldCODB\\Users\\Characters\\" + Name + ".chr"))
return "Character already exists.";
IniFile F = new IniFile("C:\\OldCODB\\Users\\Characters\\" + Name + ".chr");
F.WriteString("Character", "name", Name);
F.WriteString("Character", "spouse", "None");
F.WriteString("Character", "whpass", "");
F.WriteString("Character", "account", Account);
F.WriteInteger("Character", "body", Body);
F.WriteInteger("Character", "hair", (410 + (Program.Rnd.Next(5) * 100)));
F.WriteInteger("Character", "map", 1010);
F.WriteInteger("Character", "x", 61);
F.WriteInteger("Character", "y", 110);
F.WriteInteger("Character", "job", Job);
F.WriteInteger("Character", "level", 1);
F.WriteInteger("Character", "strength", 5);
F.WriteInteger("Character", "agility", 5);
F.WriteInteger("Character", "vitality", 5);
F.WriteInteger("Character", "hitpoints", 33);
F.WriteInteger("Character", "silvers", 10000);
F.WriteInteger("Character", "merchant", 1);
F.Save();
IniFile Dr = new IniFile("C:\\OldCODB\\Users\\" + Account + ".usr");
Dr.WriteString("User", "character", Name);
Dr.Save();
return "ANSWER_OK";
yea u were right i dont see anything that is actually saving the donations neither ty
|
|
|
08/09/2010, 13:21
|
#4
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
I think nobility isnt saved at the characters.
It aint in my source.
Is just reading from nobility.dat, but ur using sql right?
then i dont know how it works with nobility.
|
|
|
08/09/2010, 15:21
|
#5
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
@ftp add me on msn. .uk
Also are you using NewestCOServer? or Sql?
|
|
|
08/09/2010, 16:46
|
#6
|
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
|
dats cuz its only loading the "IMPORTANT" character files "EXCEPT" for nobility...if ur using a flat-file database I can help u if you dont den Ill figure out a diff load/save method for sql or u can figure dat part out...
FOR FLAT-FILE DATABASES, MAKE SURE YOU HAVE NOBILITY.DAT IN UR OLDCODB DATABASE FOLDER NOT IN ANY OTHER FOLDER:
Code:
public static void SaveEmpire()
{
FileStream FS = new FileStream(@"C:\OldCODB\Nobility.dat", FileMode.OpenOrCreate);
BinaryWriter BW = new BinaryWriter(FS);
for (int i = 0; i < Game.World.EmpireBoard.Length; i++)
Game.World.EmpireBoard[i].WriteThis(BW);
BW.Close();
FS.Close();
}
public static void LoadEmpire()
{
if (System.IO.File.Exists(@"C:\OldCODB\Nobility.dat"))
{
FileStream FS = new FileStream(@"C:\OldCODB\Nobility.dat", FileMode.Open);
BinaryReader BR = new BinaryReader(FS);
for (int i = 0; i < Game.World.EmpireBoard.Length; i++)
Game.World.EmpireBoard[i].ReadThis(BR);
BR.Close();
FS.Close();
}
}
DAT will simply save/load the nobility for the .dat file...anyways u shuld have figured dis out as it was/is still in da source...
|
|
|
|
Similar Threads
|
Database
01/06/2010 - Metin2 Private Server - 12 Replies
Hey liebe Com!!!
kann mir eienr nen link schicken für die metin2 database wäre echt nett :handsdown::handsdown:
|
DataBase
10/16/2009 - Metin2 Private Server - 11 Replies
Hallo Leuts
Ich habe ein Problem, ich suche schon seite einem Tag und finde die DB nicht.
Und meine frage ist : hat einer einen LInk um die db downzuloaden??
Sorry das ich jetzt ein neues Thema erstellt habe , aber ich kamm wirklich nicht weiter.
|
new database
10/16/2009 - Metin2 Private Server - 7 Replies
N'abend
also ich habe da mal eine frage.
Es war ja mal so dass die clubmt2 datenbank mal "gehackt" worden ist und zum download bereit stand. ich hätte sie gerne doch ich finde nichts ordentliches mit der sufu und google.
wenn sie jemand noch hat pls pn me.
mfg greivel
|
Help me with database.
07/13/2009 - CO2 Private Server - 5 Replies
:handsdown:I can't register my friends on my server because> database doesn't work?To say simple i can't create a new account.
Someone please help me with this problem.TY:)
|
about the eo database
04/14/2008 - EO PServer Hosting - 1 Replies
Does anybody know the current databases that don't change, like mob's ect..
Oh and what does the e-money database do? Because it's like 500mb lol.
If anybody knows please tell me :-)
|
All times are GMT +2. The time now is 00:25.
|
|