Custom error code/message when removing actors from plugin?
Options
Hi!
Is it possible to get a custom error code when kicking actors from a plugin?
Now I use:
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):
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) {}
0
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,
ilya0 -
Okay, so if I send a reliable event before kicking, it is safe to assume the client receives the event before getting kicked out?0
-
@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 message1
-
@undercover Send the event and schedule kick 200ms later. This works for me.1
-
Okay, thanks for the input guys! I will try it out.0