i've Problem with my Source, i made Change Name Npc but there were a problem when i change my name from npc it doesn't make any sense.
and i put the code it's not work
My Source Uses SubSonic
Two Codes Deon't Work
First code
PHP Code:
public static void UpdateData(Client.GameState client, string column, object value)
{
EntityCollection ent = new EntityCollection();
ent.LoadAndCloseReader(Entity.FetchByParameter("UID", client.Entity.UID));
if (ent.Count > 0)
{
ent[0].SetColumnValue(column, value);
ent[0].Save();
}
}
PHP Code:
public static void UpdateName(Client.GameState client)
{
UpdateData(client, "Name", client.Entity._CName);
}
PHP Code:
public static void UpdateName(Client.GameState client)
{
MySqlCommand command = new MySqlCommand(MySqlCommandType.UPDATE);
command.Update("entities").Set("Name", client.Entity.Name).Where("UID", client.Entity.UID).Execute();
}
System.Exception: Can't save: Name requires a value
at SubSonic.ActiveRecord`1.Save(String userName)
at SubSonic.ActiveRecord`1.Save()
Thanks