Error with a rpc call in multiplayer

When i try to execute:
var used_targets=_get_targets(targets)
apply_effects.rpc(used_targets)
It gives me the following error:
Invalid call. Nonexistent function ‘rpc’ in base ‘Callable’.