Lucian
Member
I have to add a Token variable to PlayerMobile.cs for my premium system ,
However I tried to add the variable like that in PlayerMobile.cs :
Than I deserialize and serialize them like that :
Deserialize :
Serialize :
Than I start my ServUO and got 0 errors, but when I restart my server , It says An Error was encountered .
When I Press Y , It deletes my main character and it's happening all time.
Sorry for bad english , I hope you can understand me .
Help please.
However I tried to add the variable like that in PlayerMobile.cs :
private int m_Token;
[CommandProperty(AccessLevel.Administrator)]
public int Token
{
get { return m_Token; }
set { m_Token = value; }
}
[CommandProperty(AccessLevel.Administrator)]
public int Token
{
get { return m_Token; }
set { m_Token = value; }
}
Deserialize :
case 30:
{
m_Token = reader.ReadInt();
goto case 29;
}
{
m_Token = reader.ReadInt();
goto case 29;
}
base.Serialize(writer);
writer.Write(29); // version
writer.Write(m_Token);
writer.Write(29); // version
writer.Write(m_Token);
Than I start my ServUO and got 0 errors, but when I restart my server , It says An Error was encountered .
When I Press Y , It deletes my main character and it's happening all time.
Sorry for bad english , I hope you can understand me .
Help please.