- Home /
Question by
doncsoo · Jun 15, 2013 at 07:55 PM ·
errorerror messageparsing error
Parsing error -.-
hey guys! why i'm getting parsing error in this script? Assets/Standard Assets/Scripts/MenuScript.cs(16,1): error CS8025: Parsing Error
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
void OnGUI(){
if (GUI.Button(new Rect((Screen.width-100)/2, (Screen.height-170)/2, 100, 30),"Level")){
Application.LoadLevel(1);
}
if (GUI.Button(new Rect((Screen.width-100)/2, (Screen.height-170)/2 + 35, 100, 30),"Level 2")){
Application.LoadLevel(2);
}
if (GUI.Button(new Rect((Screen.width-100)/2, (Screen.height-170)/2 + 70, 100, 30),"Quit")){
Application.Quit();
}
}
Comment
Answer by aldonaletto · Jun 15, 2013 at 07:59 PM
You must add a } to the end of your script: the class { isn't being matched by any bracket.
Your answer
![](https://koobas.hobune.stream/wayback/20220613104237im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Ending my game 3 Answers
All scripts in unity have stopped working 1 Answer
Sprite Atlas (Sprite Atlas UI) Error 0 Answers