- Home /
This question was
closed Dec 04, 2014 at 06:47 PM by
Graham-Dunnett for the following reason:
Duplicate Question
I am getting error cs1525 for '}' on line 11,17. How come?
using UnityEngine; using System.Collections;
public class forcefull : MonoBehaviour {
void Update ()
{
if (Input.GetButtonDown ("Vertical"))
{
Rigidbody2D.AddForce (Vector2.up * 10)
}
else
{
Rigidbody2D.AddForce(Vector2.up *0.1);
}
}
}
Comment
Best Answer
Answer by gjf · Dec 04, 2014 at 03:05 PM
in future, please try to format all of your code.
the problem is a missing semicolon on line 5 of the code that you posted.
Follow this Question
Related Questions
İf-Else block doesn't react the condition 2 Answers
if statement for 6 ints help C# 2 Answers
problem with instance 1 Answer
Else and If 2 Answers
How stop a piece of code from running if the conditions are no more met. 1 Answer