I have this script here for multi player and I cant seem to find the compiler errors.

This is the script im using.

  using UnityEngine;

using System.Collections;

/// Multiplayerscript. This script is attached to the MultiplayerManager and it
/// is the foundation to our multiplayer system.

public class Multiplayerscript : MonoBehaviour {

//variables start___________________________________

private string TitleMessage = "GTGD Series 1 Prototype";

private string ConnectToIP = "";

private int connectionPort = 26500;

private bool useNAT = false; 

private string ipAdress;

private string port

private int numberOfPlayers = 10:

public string playerName;

public string severName;

public string serverNameForClient;

private bool iWantToSetupAServer = false;

private bool iWantToConnectToASever = false;

//these variables are use to define the main

private Rect connectionWindowRect;

private int connectionWindowWidth = 400;

private int connectionWindowHeight = 280;

private int buttonHeight = 60;

private int leftIndent;

private int topIndent;

// Use this for initialization
void Start () {


// Update is called once per frame
void Update () {

void connectWindow()int winowID
    //Leave a gap from the header.

    //When the player launches the game they have the option
	//to create a server or join a server. The variables
    //iWantToSetupAServer and iWantToConnectToAServer start as
	//false so the player is presented with two buttons 
	//"Set up my server" and "connect to a server"

    if(iWantToSetupAServer == false && iWantToConnectToASever == false)
		if(GUILayout.Button("Set up a server", GUILayout.Height(buttonHeight)))
				iWantToSetupAServer = true;


		if(GUILayout.Button("connect To a server", GUILayout.Height(buttonHeight)))
			iWantToConnectToASever = true;
		if(Application.isWebPalyer == false && Application.isEditor == false
	        if(GUILayout.Button("Exit Prototype", GUILayout.Height(buttonHeight)))


void onGUI()		
    //If the player is disconnected then run the ConnectWindow function
	if (Network.peerType == NetworkPeerType.Disconnected) 
	    //Determine the position of the window based on the width and 
		//height of the screen. The window will be placed in the middle
		//middle of the screen

	    leftIndent = Screen.width / 2 - connectionWindowWidth /2;

	    topIndent = Screen.height / 2 - connectionWindowHeight /2
		connectionWindowRect = new Rect (leftIndent, topIndent,connectionWindowWidth,
	    connectionWindowRect = GUILayout.Window(0, connectionWindowRect, ConnectWindow,



Did you write this script? There is not just a single error here, but a number of them. To fix the errors, double click on the top error in the list in Unity and then go to Monodevelop. The error will be on the line it highlights or sometimes the line before. Fix that one error and then go back to Unity and get the new top error.

The first couple are simple errors, but you also have a larger messes on line 56. You are attempting to nest the 'connectWindow() function inside of Update() and have what I think is a variable declaration outside the body of the funciton. You cannot nest functions in C#

You need to go back and look at the structure of this code. Consider commenting out the contents of functions and then do what is necessary to get all the empty functions to compile. Then go back and worry about the contents.