RPC method 'LocalSelfDestroy' found on object with PhotonView 35 but has wrong parameters.

Options

RPC method 'LocalSelfDestroy' found on object with PhotonView 35 but has wrong parameters. Implement as 'LocalSelfDestroy(Int32)'. PhotonMessageInfo is optional as final parameter.Return type must be void or IEnumerator (if you enable RunRpcCoroutines).

UnityEngine.Debug:LogErrorFormat (UnityEngine.Object,string,object[])

This error appears when I want to pick up the item "Battery" The item does not disappear. I am a very big beginner in Photon, and I don't understand a lot. But I've been working on this error for the second day.


Here is the subject selection script:

Yes, maybe the script is dumb enough.

Answers

  • Tobias
    Options

    RPCs are called on the same object / PhotonView remotely as locally.

    If you call photonView.RPC(...); there is no need to pass the ViewID, as it's implied by the photonView you call it on...

    Maybe your code has another "LocalSelfDestroy" method, which doesn't have the parameter? In the code you sent, I don't see why it should not be called and instead you run into this error.