Errors With Game Over Script
Hi, recently I have been working on a platformer-type game. I have been trying to create my first obstacle with a script that switches to a game over scene here's the script
using UnityEngine;
using System.Collections;
public class DestroyCubes : MonoBehaviour
{
void OnCollisionEnter (Collision col)
{
if(col.gameObject.name =="Hurt")
{
Application.LoadLevel("A")
}
}
}
However, Whenever I Run This I Get These Errors: Assets/NewBehaviourScript.cs(11,17): error CS1525: Unexpected symbol `}' Assets/NewBehaviourScript.cs(13,3): error CS8025: Parsing error
Answer by meechan007 · Dec 13, 2015 at 04:44 PM
You have missed out a ; here:Application.LoadLevel("A"). It should look like this: Application.LoadLevel("A");
Your answer
Follow this Question
Related Questions
An instance of type 'UnityEngine.Behaviour' is required to access non static member 'enabled'. 0 Answers
It seems that Unity 5.4.1 has bug !!! 0 Answers
UCE0001: ';' expected. Insert a semicolon at the end. 1 Answer
BCE0044: expecting ''', found '\r'. 1 Answer
How do i fix this error? Cannot implicitly convert type `Sprite' to `UnityEngine.Sprite' 1 Answer