Im trying to send functions using RPC…but it always said this message when i press the W keybutton!!
Sending RPC 'OUD' failed because the number of supplied parameters doesn't match the rpc declaration. Expected 0 but got 1 parameters.
UnityEngine.NetworkView:RPC(String, RPCMode, Object[])
thats my script and i dont know whats wrong with it
function Update()
{
if(Input.GetKeyDown(KeyCode.W)){networkView.RPC("ODW",RPCMode.Others,null);}
if(Input.GetKeyUp(KeyCode.W)){networkView.RPC("OUW",RPCMode.Others,null);}
}
@RPC
function ODW(){test=true;}
@RPC
function OUW(){test=true;}