LevelManager.cs(17,9): error CS1525: Unexpected symbol `}' i cant find the bug here will be glad if someone can help me
using UnityEngine; using System.Collections;
public class LevelManager : MonoBehaviour { public void LoadLevel(string name){ Debug.Log("Level load"); Application.LoadLevel(name); }
public void QuitRequest(){
Application.Quit();
}
public void LoadNextLevel(){
Application.LoadLevel(Application.loadedLevel + 1)
}
public void BrickDestroyed(){
if (Brick.breakableCount <= 0)
LoadNextLevel();
}
}
This was already asked 5 hours ago. The error is in the line Application.LoadLevel(Application.loadedLevel + 1)
, you need a ;
after it.
Answer by Kishotta · Jan 30, 2018 at 08:17 PM
You're missing a semicolon in LoadNexLevel
.
O$$anonymous$$G I SEARCH FOR ACTUALLY HOURS I CANT BELIEVE IT WAS A SE$$anonymous$$ICOLONN XDD Thanks so much man! XD
Always check your semicolons! Out of curiosity, what IDE are you using? I use Rider now (thanks to that sweet sweet .edu discount) but I'm pretty sure Visual Studio and VSCode will highlight those sorts of things for you.
Your answer
![](https://koobas.hobune.stream/wayback/20220612151625im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Show ad after certain line of code is called 5 times 1 Answer
Hello everyone I have a problem with rounding number of my score 2 Answers
error CS0103 rb doesn't exist in the current context, ligne 8 and 15 , can't fix it 1 Answer
Any ideas as to why I get this error? (CS1061) 1 Answer
I am trying to offset camera x distance from player all the time. Even if the player moves. 1 Answer