Lokai
Knight
JamesCurtis;757353 said:Alright, well now i have the playermobile.cs figured out, and the food.cs is having serialization problems. I swear to you i've merged many a systems as we have 26 systems in our shard, many which have distro mods, but this one seems to be getting the best of me. Now all of the food is wanting to be deleted. I've messed with the food.cs using some of what you've taught me. This script works without the gd13 additions, does not work with the gd13 additions. It will compile, but won't save and reload without serialization issues.
I figure that at least if people look back at these issues it will save them from having to ask about it
Edit: I think the problem might be at line 191. I've tried changing it to 5, but to no avail.
You have it like this:
Code:
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
/*GD13_SicknessSYS_Start_6*/
writer.Write( (int) 4 ); // version
/*GD13_SicknessSYS_End_6*/
writer.Write( m_Poisoner );
Poison.Serialize( m_Poison, writer );
writer.Write( m_FillFactor );
/*GD13_SicknessSYS_Start_7*/
writer.Write( m_Rotten );
/*GD13_SicknessSYS_End_7*/
}
Should be like this:
Code:
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
/*GD13_SicknessSYS_Start_6*/
writer.Write( (int) 5 ); // version
/*GD13_SicknessSYS_End_6*/
/*GD13_SicknessSYS_Start_7*/
writer.Write( m_Rotten );
/*GD13_SicknessSYS_End_7*/
writer.Write( m_Poisoner );
Poison.Serialize( m_Poison, writer );
writer.Write( m_FillFactor );
}
We need to write 'm_Rotten' FIRST after the version number, because that will be the first thing we will read.
If you already saved once using your old method, then you will still get errors loading. In that case, you will need to do something else. I can show you that later.