Game Controller Modification

So i tried to modify this a bit. Originally was going to create a UI for the Restart and Game Over Options, but it wasn’t working. So here is the present script and i am getting one stupid error and tried several ways to fix it. None worked.

Assets/Scripts/GameController.cs(53,17): error CS0116: A namespace can only contain types and namespace declaration.

Obviously I placed the “declarations” and there isn’t anything that does not have the “proper tag”, there is a Restart and Game Over Text element in the hierarchy for the Game Controller, and the game controller itself is also tagged.

PS. Its not showing any error Mono develop or Visual Studio. its only showing it as an error in the Engine itself!

using UnityEngine;
    using System.Collections;
    using UnityEngine.UI;

public class GameController : MonoBehaviour {

    public Text scoreText;
    private int score;
    public Text restartText;
    public Text gameOverText;
    private bool gameOver;
    private bool restart;
    
    void Start()
    {
        gameOver = false;
        restart = false;
        restartText.text = "";
        gameOverText.text = "";
        score = 0;
        UpdateScore();

         }
    void Update()
    {
        if (restart)
        {
            if (Input.GetKeyDown(KeyCode.R))
            {
                Application.LoadLevel(Application.loadedLevel);

            if (gameOver)
                {
         restartText.text = "Press 'R' for Restart";
         restart = true;
          break;
                }
            }
        }
    }
    public void AddScore(int newScoreValue)
    {
        score += newScoreValue;
        UpdateScore();
    }

    void UpdateScore()
    {
        scoreText.text = "Score: " + score;
    }
}
    public void GameOver()
{
    gameOverText.text = "Game Over";
    gameOver = true;
}

Originally i tried to combine this with the following Spawn location where i could create empty spawn location objects manually, but again it didn’t work.

using UnityEngine;
using System.Collections;

public class EnemySpawnPoint : MonoBehaviour {

    public Transform [] SpawnPoints;
    public float spawnTime = 5.0f;
    public GameObject[] Enemy        ;

    // Use this for initialization
    void Start ()
    {
        InvokeRepeating("Enemy", spawnTime, spawnTime);
	}
	
	// Update is called once per frame
	void Update () {
	
	}
    void SpawnEnemyAlien()
    {
        int spawnIndex = Random.Range(0, SpawnPoints.Length);
        int objectIndex = Random.Range(0, Enemy.Length);
        Instantiate(Enemy[objectIndex], SpawnPoints[spawnIndex].position, SpawnPoints[spawnIndex].rotation);
    }
}

If anyone can simply combine these two for me for Unity 5.3 including changing the application load level element, it be great because I seriously cannot get it right. its just that simple.

You’re closing your GameController class before GameOver() method move the “}” at line 51 to 57

Also : on line 36 that break; //No enclosing loop out of which to break or continue
I guess you meant return; ?