Operationcode is byte type, can it be defined to 255 at most?

byte is only 8 bits, can it be defined to 256 at most?

Best Answer

  • Kaiserludi
    Kaiserludi admin
    edited March 2021 Answer ✓
    Hi @patrick.
    If you actually run out of operation codes (this is actually extremely unlikely if you aren't doing something really unusual as there are many thousands of games using Photon and we are not aware of even a single one, which had more than 200 different operations or even cam close to that number), then you can simply send some parameter with your operation that your code can interpret as a sub-operation code.

Answers

  • hi, @patrick
    byte can has values from 0 to 255.

    from 200-255 it is reserved for ExitGames operations if we talk about Realtime

    best,
    ilya
  • @chvetsov
    Thank you. If I use photon server, then my operation code can only be defined to 255. Can't I define more?
  • Kaiserludi
    Kaiserludi admin
    edited March 2021 Answer ✓
    Hi @patrick.
    If you actually run out of operation codes (this is actually extremely unlikely if you aren't doing something really unusual as there are many thousands of games using Photon and we are not aware of even a single one, which had more than 200 different operations or even cam close to that number), then you can simply send some parameter with your operation that your code can interpret as a sub-operation code.