- Home /
Question by
TheRichardGamer · Aug 16, 2013 at 09:15 AM ·
rpcvoidscripterror
[RPC] identifier expected
Ok, so I'm making a [RPC] and I get an error where it says that it expects a identifier.
[RPC]
void PrintText(text string)
{
Debug.Log("You are connected!");
}
Comment
Answer by Bunny83 · Aug 16, 2013 at 09:58 AM
Well, in C# you have to declare variables or parameters in the format:
<type> <name>
So your function should look like this:
[RPC]
void PrintText(string text)
{
Debug.Log("You are connected!");
}
btw: You should always check the line number the compiler gives you. The error is either on that line or above!
Your answer
Follow this Question
Related Questions
Using an RPC call within an RPC function? 2 Answers
AllocateViewID over RPC but the NetworkView doesn't exist 2 Answers
Networking Unity can't get players on network to change each others variables. 0 Answers
Very Strange RPC error 1 Answer
[PUN] Get variables from server via RPC OnJoinedRoom() 1 Answer