heres my codes
Code:
using System;
using System.IO;
using System.Text;
using Conquer_Online_Server.ServerBase;
using System.Collections.Generic;
using Conquer.Database;
namespace Conquer_Online_Server.Database
{
public class JarTable
{
public enum States : ushort
{
HaventStarted = 0,
Stared = 1
}
public uint Kills, Required, Count, State, Type;
public string Player;
public JarTable(string player)
{
this.Player = player;
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT);
cmd.Select("CloudSaint").Where("Name", player);
MySqlReader r = new MySqlReader(cmd);
if (r.Read())
{
this.Kills = r.ReadUInt32("Kills");
this.Type = r.ReadUInt32("Type");
this.Required = r.ReadUInt32("Required");
this.Count = r.ReadUInt32("Count");
this.State = r.ReadUInt32("Started");
this.Player = r.ReadString("Name");
}
r.Close();
}
public void UpdateJar()
{
Database.MySqlCommand cmd = new Database.MySqlCommand(Database.MySqlCommandType.UPDATE);
cmd.Update("CloudSaint").Set("Required", Required).Set("Kills", Kills).Set("Started", State).Set("Count", Count).Set("Type", Type).Where("Name", Player).Execute();
}
}
}
Have i missed smthing ?






