Custom error code/message when removing actors from plugin?

Hi!

Is it possible to get a custom error code when kicking actors from a plugin?

Now I use:
PluginHost.RemoveActor(ActorNr, "Some error");

Also, what is the error message used for, logging purposes? I don't receive the error message at the client, just an error code (ExitGames::Photon::StatusCode::DISCONNECT_BY_SERVER_LOGIC):
virtual void connectionErrorReturn(int errorCode) {}

Comments

  • Hi, @undercover

    it is used for logging and to inform plugin. btw plugin may send something client. I think, right before kicking you may send an event to the client with corresponding info.

    best,
    ilya
  • Okay, so if I send a reliable event before kicking, it is safe to assume the client receives the event before getting kicked out?
  • @undercover no, it is not safe. you may try to create a timer to postpone actual kicking. then there is more chance that client will get message
  • @undercover Send the event and schedule kick 200ms later. This works for me.
  • Okay, thanks for the input guys! I will try it out.