Question by
Air_Bell · Oct 26, 2016 at 10:30 PM ·
application.loadlevel
2 Errors I Can't Solve
Hi! I'm very new to unity, and I am making a basic game. I have 2 errors when trying to enter play mode, "error CS1525: Unexpected sybmol '}'" on 29,9, and "error CS8025: Parsing error" on 30,1. Any solutions?
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Z : MonoBehaviour {
public float speed;
private Rigidbody rb;
void Start ()
{
rb = GetComponent<Rigidbody>();
}
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
rb.AddForce (movement * speed);
}
void OnTriggerEnter (Collider other)
{
Application.LoadLevel("Level 2")
} //This bracket is "unexpected", error CS1525
} //This is the Parsing error, CS8025
Comment
Best Answer
Answer by doublemax · Oct 26, 2016 at 10:31 PM
Application.LoadLevel("Level 2")
Semicolon missing at the end of this line.
Your answer
![](https://koobas.hobune.stream/wayback/20220612095508im_/https://answers.unity.com/themes/thub/images/avi.jpg)