CS1525: Unexpected symbol `}'

Hey!

I developed a pause menü for my game but there’s a terrible error and i can’t fix it! I need your help!

Assets/Scripts/ingame/pause_menu.cs(29,25): error CS1525: Unexpected symbol `}'

Code:

using UnityEngine;
using System.Collections;

public class pause_menu : MonoBehaviour {

	private bool isPause = false;
	private Rect butRect;
	private float ctrlWidth = 160;
	private float ctrlHeight = 30;

	void Awake (){
		butRect = new Rect ((Screen.width - ctrlWidth) / 2, 0, ctrlWidth, ctrlHeight);
	}

	void OnGUI() 
	{
		if (isPause) 
		{
			butRect.y = (Screen.height - ctrlHeight) / 2;

			if (GUI.Button (butRect, "Spiel Fortsetzten"))
				ToggleTimeScale ();

			butRect.y += ctrlHeight + 20;
			if (GUI.Button (butRect, "Spiel Beenden")) 
			{
				ToggleTimeScale ();
				Application.LoadLevel("mainmenu")
			}
		}
	}

			void ToggleTimeScale() 
			{
				if (!isPause) 
		{
			Time.timeScale = 0;
		} 
		else 
		{
					Time.timeScale = 1;
				}
				isPause = !isPause;
			}
	}
}

Line #28 add “;” in the end

Last line remove “}”

Result:

using UnityEngine;
using System.Collections;

public class pause_menu : MonoBehaviour
{

    private bool isPause = false;
    private Rect butRect;
    private float ctrlWidth = 160;
    private float ctrlHeight = 30;
    void Awake()
    {
        butRect = new Rect((Screen.width - ctrlWidth) / 2, 0, ctrlWidth, ctrlHeight);
    }
    void OnGUI()
    {
        if (isPause)
        {
            butRect.y = (Screen.height - ctrlHeight) / 2;
            if (GUI.Button(butRect, "Spiel Fortsetzten")) ToggleTimeScale();
            butRect.y += ctrlHeight + 20;
            if (GUI.Button(butRect, "Spiel Beenden"))
            {
                ToggleTimeScale();
                Application.LoadLevel("mainmenu");
            }
        }
    }
    void ToggleTimeScale()
    {
        if (!isPause)
        {
            Time.timeScale = 0;
        }
        else
        {
            Time.timeScale = 1;
        }
        isPause = !isPause;
    }
}