I just doing a repeat in code of what I just did in the if statement to the else statement. I’m trying to get the scene to switch if the score is not reach . I did do an else statement and I keep get this same error /TestScript.cs(26,21): error CS1525: Unexpected symbol `}’ .
TestScript.cs(37,1): error CS8025: Parsing error
Here is my code :
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class TestScript : MonoBehaviour
{
public MyClockScript myClock;
public ScoreManagerScript scoremanager;
public int scoreToReach = 99; // change this value to what you want
public int leastscore = 50;
public string nextScene = "FY"; // change this value to what you want
void Update ()
{
if (myClock.m_leftTime <= 0)
{
if ((ScoreManagerScript.score >= scoreToReach) && (nextScene != ""))
{
SceneManager.LoadScene(nextScene);
}
else
{
((ScoreManagerScript.score >= scoreToReach) && (nextScene != ""))
}
}
}
}