I'm using Lokai's race/class system but modified to use PlayerMobile instead of NewMobile
If I implement the new skills into player mobile it crashes when I save the shard.
Any thoughts on why this would be happening?
This part in the serializer is causing a crash
which is serializing this
crash msg
If I implement the new skills into player mobile it crashes when I save the shard.
Any thoughts on why this would be happening?
This part in the serializer is causing a crash
Code:
for (int x=0; x<5; x++)
{
writer.Write( (int) m_Skills[x].Name );
writer.Write( (int) m_Skills[x].Value );
}
which is serializing this
Code:
private NewSkillNameValue[] m_Skills;
/// <summary>
/// These are the NewSkillNameValue's for the NewMobile class.
/// They include ClassSkill_1 through ClassSkill_5.
/// </summary>
public NewSkillNameValue[] NewSkills { get { return m_Skills; } set { m_Skills = value; } }
public NewSkillNameValue ClassSkill_1 { get { return m_Skills[0]; } set { m_Skills[0] = value; } }
public NewSkillNameValue ClassSkill_2 { get { return m_Skills[1]; } set { m_Skills[1] = value; } }
public NewSkillNameValue ClassSkill_3 { get { return m_Skills[2]; } set { m_Skills[2] = value; } }
public NewSkillNameValue ClassSkill_4 { get { return m_Skills[3]; } set { m_Skills[3] = value; } }
public NewSkillNameValue ClassSkill_5 { get { return m_Skills[4]; } set { m_Skills[4] = value; } }
crash msg
Code:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Mobiles.PlayerMobile.Serialize(GenericWriter writer) in ...\ServUO-master\Scripts\Mobiles\PlayerMobile.cs:line 4355