A.
Topics
Forum Topics not found
Replies
a.babounia2004
31 May 2024, 07:28
( Updated at: 31 May 2024, 08:09 )
Thanks for your answer
@a.babounia2004
a.babounia2004
31 May 2024, 07:33 ( Updated at: 03 Jun 2024, 01:01 )
Hello @geometry dash lite,
In order to read the orders returned in the ProtoOAOrderListRes message, you will need to deserialize the message payload into the appropriate object structure. Here's an example of how you can do that:
2. In your OnMessageReceived method, after identifying that the payload type is "2176" (as you mentioned in your code snippet), you can proceed with deserializing the message payload into the appropriate object.
csharp
Copy
case "2176":
ProtoOAOrderListRes orderListResponse = ProtoOAOrderListRes.Parser.ParseFrom(message.GetPayloadBytes());
// Access the orders from the deserialized object
List<Order> orders = orderListResponse.OrdersList;
// Process the orders as needed
// ...
break;
@a.babounia2004