error CS8025: Parsing error
Hey guys. I am new with unity and cannot figure out my parsing error. With every single script I right a parsing error comes with it. In this case where I fixed the parsing error it shows another five errors once it's fixed.
{
public float mSpeed;
void Start ()
{
mSpeed = 1f;
}
void Update ()
{
transform.Translate (mspeed * Input.GetAxis ("Horizontal") * Time.deltaTime, Of, mspeed * input.GetAxis ("Vertical") * Time.deltaTime);
}
If I would put a } at the end it shows me 5 errors.
Hey guys. I am new with unity and cannot figure out my parsing error. With every single script I right a parsing error comes with it. In this case where I fixed the parsing error it shows another five errors once it's fixed.
{
public float mSpeed;
void Start ()
{
mSpeed = 1f;
}
void Update ()
{
transform.Translate (mspeed * Input.GetAxis ("Horizontal") * Time.deltaTime, Of, mspeed * input.GetAxis ("Vertical") * Time.deltaTime);
If I would put a } at the end it shows me 5 errors.
Answer by doublemax · Sep 12, 2016 at 10:16 AM
Of
That's the letter O, not a digit 0 (Zero).
Please copy and paste the whole error message.
Another error:
input.GetAxis ("Vertical")
"Input" needs a capital "I".
void Update ()
{
transform.Translate (mspeed * Input.GetAxis ("Horizontal") * Time.deltaTime, 0f, mspeed * Input.GetAxis ("Vertical") * Time.deltaTime);
}
Name 'mSpeed' does not exist in the current context
Name 'mSpeed' does not exist in the current context
the best overloaded method match for "UnityEngine.Transform.Translate(float, float, float)" has some invalid arguments
Argument '#1' cannot convert 'object' expression to type 'float'
An object reference is required to access non-static member 'UnityEngine.Transform.Translate(UnityEngine.Transform.Translate(UnityEngine.Vector3)'
In this case "transform" needs to be with a small "t".
If that throws an error, please show the whole script from start to end.
Your answer
Follow this Question
Related Questions
Coding Errors 1 Answer
Unity Parsing Error CS8025 on Last Line? 2 Answers
Need help with this code! 1 Answer
Object with rigidbody2D doesn't move when it's supposed to, 0 Answers
Help with pause menu? 0 Answers