- Home /
error CS1525 unexpected symbol '}'
Hi,
So i am trying to create a 2D game in which my character only needs the ability to jump. I am trying to accomplish this without using any of the Unity downloadable assets or addons.
I created a simple script (very simple) to make my player jump, however when i go to run the game i cant due to errors.
The errors are the 'Parsing error' and 'unexpected symbol '}'
However in my script i cannot find the issue? this is probably just because i am new to unity and C# scripting.
The script is below:
public class Jump : MonoBehaviour {
public float JumpSpeed = 100.0f;
void jump(){
Animation.Play ("Jump");
Rigidbody.AddForce (Vector3.up * JumpSpeed);
}
void Start () {
}
void Update () {
if(Input.GetButtonDown("jump")){
Jump()
}
}
}
Any help would be majorly appreciated, thx :)
Answer by tanoshimi · Jul 03, 2015 at 06:43 AM
Jump()
needs to beJump();
void jump(){
needs to bevoid Jump(){
Answer by Sekkyoku · Jul 03, 2015 at 06:56 AM
Ahh yes, thank you so much guys :) i spent ages going through it letter by letter pretty much and still didn't notice :P
thx :) :)