stats wont load for me
i made a new file called Stats
database.cs
in public static void StartServer()
i added
in DataLoader.cs i added
and the stats still will not load can anyone help me.
i made a new file called Stats
Code:
/*
* Created by SharpDevelop.
* User: sams
* Date: 3/18/2009
* Time: 7:31 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
namespace CoEmu_v2_GameServer.Structs
{
/// <summary>
/// Contains a struct for stats
/// </summary>
public partial class Struct
{
public class stats
{
public int Profession;
public int Level;
public int Strength;
public int Vitality;
public int Dexterity;
public int Spirit;
}
}
}
Code:
public static void GetStats(Character Client)
{
MySqlCommand Cmd = new MySqlCommand("SELECT * FROM `stats` WHERE `Profession` = " + (int)Client.Class + ", `level` = " + Client.Level + ", `strength` = " + Client.PkPoints + ", `xCord` = " + Client.X + ", `yCord` = " + Client.Y + ", `Map` = " + (int)Client.Map + ", `HairStyle` = " + Client.Hair + ", `Class` = " + (int)Client.Class +", `Str` = " + Client.Strength + ",`Vit` = " + Client.Vitality + ", `Spi` = " + Client.Spirit + ", `Dex` = " + Client.Dexterity + " WHERE `CharID` = " + Client.ID, DatabaseConnection.NewConnection());
Cmd.ExecuteNonQuery();
Cmd.Connection.Close();
Cmd.Connection.Dispose();
Cmd.Dispose();
}
Code:
public static Dictionary<int, Struct.stats> Stats = new Dictionary<int, Struct.stats>();
i added
Code:
Database.Database.GetStats();
Code:
public static void LoadStats()
{
Database.Database.GetStats();
}