Hello I was wondering if someone might be able to help me out with problem. i was trying to merge a copy of fs taming. i have worked on it for a couple days re merging and re merging .
My server compiles but everytime i place a Horse or a Healer it wants to delete it right after i go to restart the server. Everything works in the merge except for this problem. Here is my player mobile file and basecreature file. Maybe a second set of eyes would help. Thankz
Well, for one thing, you made edits to serialization and you didn't increase your version number. Any time you add things under a "Serialize" method, you have to increase the version number. Here is what I mean:
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(20); // version
Now you have it set to version 20. But you can see further down you added this:
// Version 21 FS:ATS EDITS
writer.Write((bool)m_IsMating);
writer.Write((int)m_ABPoints);
writer.Write((int)m_Exp);
writer.Write((int)m_NextLevel);
along with some other things. So you are still writing version 20, but when the compiler checks deserialization (when it is reading certain attributes for mobiles like the new exp system for pets) it is running a check on the version to try and figure out, for example, how much exp mobiles have now that you've added the FS taming system. Here is an example of the code listed under Deserialize:
if (version >= 21)
{
m_IsMating = reader.ReadBool();
m_ABPoints = reader.ReadInt();
m_Exp = reader.ReadInt();
m_NextLevel = reader.ReadInt();
This means it checks the version to see if it's greater than or equal to 21, and if it is it will try and read all those things like pet level, exp, etc. Since you didn't increase your version to 21, it says "Oh, the version is lower than 21, so we don't need to run this code". It can run into conflicts there. So what you need to do is change
writer.Write(20); //version
to
writer.Write(21); //version
As for your PlayerMobile serialization errors, I don't see any changes you've done under Serialization in PlayerMobile.cs that pertain to the FS:ATS taming system so I'm not sure why you would be encountering errors there.