RPC Failing because function does not exists

I can’t seem to figure this out. I’m trying to set up a simple network test to send a message from one computer to the next, but I can’t get RPC to work from the server end. It keeps saying “RPC call failed because the function “UpdateText” does not exist in any script attached to ‘serverController’”

serverController is the controller I have running the code on the server with a script called serverControl that actually sends the RPC call. On the client end there’s a clientControl script with the RPC function in it I want to call but I can’t figure it out.

My code looks like this:

//server end
string sendText = "Hello, world!";

void start(){
Network.InitializeServer(10, 25565, true);

void sendMessage()
networkView.RPC("UpdateText", RPCMode.OthersBuffered, sendText);

//client end

void UpdateText(string newText)
//set a guiText.text to newText

The serverController has a networkView attached to it, but thats it. Any ideas? Thanks!

Got it, the server script needs the rpc function in its script otherwise it hangs up and wont continue to send to the others. It seems like a crappy way of doing it, but it works