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
 

Attachments

  • BaseCreature.zip
    37.4 KB · Views: 2
  • PlayerMobile.zip
    30.3 KB · Views: 2
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:
Code:
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:
Code:
// 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:
Code:
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
Code:
writer.Write(20); //version
to
Code:
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.
 
By the way, it might still ask you to delete things the first time you bootup the server after these changes, but anything you add to the world AFTER these changes should no longer cause errors.
 
oh man i hope this works i am still working on it hours later . I check back Thank You So much for explaining. Going to try this now.
 
Awsome Works Like A Charm.... i always get stuck on that part of the merge . I use to have server on orb then merged this system . But never was explained why this was . Very Handy Peace Of information :) . Lots Of Thanks
 
Awsome Works Like A Charm.... i always get stuck on that part of the merge . I use to have server on orb then merged this system . But never was explained why this was . Very Handy Peace Of information :) . Lots Of Thanks
No problem. Just try to remember anytime you start adding things under Serialize, you will probably have to increase that "version" by 1. I feel your pain, serialization was/is always a nightmare for me. I'm currently having serialization/deserialization errors myself, but I can't figure it out and it's super frustrating. Mine are obviously something more complex than just setting the correct version which makes it a lot harder for me to narrow down =/. I am glad it's working for you though -- let me know if it happens again for some reason or something else goes wrong and I'll try to help.
 
Back