Closed Xaverix closed 2 years ago
Thanks a lot for your PR @Xaverix!
I don't think we have the ErrorCode
's ported over for C#, I think it would be relevant to bring the ErrorCode
constants from other clients, and add a new constant code for schema-mismatch instead of 0
:
For reference, here's the ErrorCode
constants in TypeScript: https://github.com/colyseus/colyseus.js/blob/9b9b71850631936c504c852b1bd369a762eab1a4/src/Protocol.ts#L15-L24
Thanks for suggestion @endel, I have added the error codes.
Looking great, thank you so much @Xaverix! 🎉
In case of schema mismatch the ConsumeSeatReservation Task was stuck forever. This is because the OnError callback which would complete the task was never called. Also the player is still in the room but unable to do anything.
Those commits are a simple fix, now the schema mismatch exception will be thrown and player will automatically leave the room.