Kilra Yan

Member
I am testing the released sphynx code which is available from
http://www.runuo.com/community/threads/sphynx-re-release.82200/

and once implemented everytime I restart server it tells me something missing from playermobile and suddendly delete my character.

I included in my playermobile all the code

Code:
switch (version)
			{
				//add sphynx
				case 30:
				{
					m_FortuneType1 = reader.ReadEncodedInt();
					if ( m_FortuneType1 > 0 )
					{
						m_FortunePower1 = reader.ReadEncodedInt();
						m_FortuneType2 = reader.ReadEncodedInt();
						m_FortunePower2 = reader.ReadEncodedInt();
						FortuneExpire = reader.ReadDateTime();
						if ( FortuneExpire > DateTime.Now )
						{
							ApplyFortune( m_FortuneType1, m_FortunePower1 );
							ApplyFortune( m_FortuneType2, m_FortunePower2 );
							FortuneGump.Told.Add( this );
						}
						else
							m_FortuneType1 = m_FortuneType2 = m_FortunePower1 = m_FortunePower2 = 0;
					}

					goto case 29;
				}

seems like the culript is happening adding this piece of code here:
Code:
base.Serialize(writer);
			
			// Version 30
			//changed next line for sphynx
			writer.Write(30); // version
			//add sphynx
			writer.WriteEncodedInt( m_FortuneType1 );
			if ( m_FortuneType1 > 0 )
			{
				writer.WriteEncodedInt( m_FortunePower1 );
				writer.WriteEncodedInt( m_FortuneType2 );
				writer.WriteEncodedInt( m_FortunePower2 );
				writer.Write( (DateTime) m_FortuneExpire );
			}
			//end sphynx
/*************************************************************************************/

If I comment this last part no error 0x0000006 during startup but the character change name to "Generic Player"...
 

Attachments

  • Immagine.jpg
    Immagine.jpg
    105.5 KB · Views: 11
How did you end up solving this? I'm having serialization errors and I think this may be the culprit for my problems as well because this is the last thing I changed under serialize/deserialize -- however everything appears in order as far as I can see so I'm stumped..What did you do?
 
ehi Denjiki, I didnt write because I was too shamed I an made elementary mistake in the serialization :(

you know, for each version you have to make sure you have the

writer.Write(n); // where n is the version

it was an issue with custom sphynx code btw

here the full discussion
 
ehi Denjiki, I didnt write because I was too shamed I an made elementary mistake in the serialization :(

you know, for each version you have to make sure you have the

writer.Write(n); // where n is the version

it was an issue with custom sphynx code btw

here the full discussion
No problem -- thanks anyways :). We all make mistakes so no need to be embarrassed, it's pretty obvious i'm making one with my PlayerMobile script right now and I can't for the life of me figure it out.. I've probably been looking at it so long that i'm just frustrated and overlooking something, perhaps a break from it will do me some good.
 
I always recommning using the Debugger from IDE. You could set break point on Deserialize before going to depth and then do a line by line debugging. This helped me always :) Good Job on solving your issue-
 
I always recommning using the Debugger from IDE. You could set break point on Deserialize before going to depth and then do a line by line debugging. This helped me always :) Good Job on solving your issue-
Yeah, it's about time I learned how to really use the debugger. Thanks for the suggestion :)
 

Active Shards

Donations

Total amount
$80.00
Goal
$1,000.00
Back