Passing variables from client to server

Well, I made a thread a few days ago but I think THAT problem in particular was a little bit confusing, so people couldn´t help me… So i want to ask a simple question, so I can get to work and try to solve it myself…

“How can I pass a variable (string) from client to server in an online game?”

Im trying to use RPCs but I dont think I understand them very well since nothing I try works…

RPCs are the solution.

You need to attach a network view to a game object (your player for example). Then in a script attached to the same game object you can call a RPC function (see the doc and tell as an argument to who you want to launch the function (the RPCmode.Server in your example), and then a second argument, your string.

The function must exist in the script attached to the game object AND in a script attached to a game object on the server side.