SendOperationResponse trouble

Options
GLeBaTi
GLeBaTi
edited February 2014 in DotNet
Hello.
this is my code:
[code2=csharp]using System;
using Photon.SocketServer.Rpc;
namespace Tactics.GameEntityModel
{
public class Credits
{
public Credits()
{
}

[DataMember(Code = (byte)SerCode.CreditsGold)]
public Int64 Gold { get; set; }

[DataMember(Code = (byte)SerCode.CreditsMoney)]
public Int64 Money { get; set; }

[DataMember(Code = (byte)SerCode.CreditsExperience)]
public Int64 Experience {get;set;}
}

}[/code2]

[code2=csharp]public class MyPhotonPeer : PeerBase
{
...
Dictionary<byte, object> d = new Dictionary<byte, object>();
d.Add(0, new GameEntityModel.Credits ());
OperationResponse resp = new OperationResponse(operationRequest.OperationCode, d);
SendOperationResponse(resp, new SendParameters());
}[/code2]

but SendOperationResponse can't word fine because it can't serialize "Credits"
What i can do? :|

Comments