When i am creating the script as the video says (Moving The Player video 3rd video in the beginners Roll A Ball video set) it says that Vector 3 shouldn’t be in there whereas in the video it shows vector3 in the script then the player moving fine this is the copy pasted script that i made based off of the video
[using UnityEngine;
using System.Collections;
public class PlayerConroler : MonoBehaviour
{
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis (“Horizontal”);
float moveVertical = Input.GetAxis (“Vertical”)
Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
rigidbody.AddForce(movement);
}
}]
I made the Vector3 boldand Green so you can see what one i’m talking about. It keeps on saying the vector3 shouldn’t be there when i delete it it says movement shouldn’t be there and so on. I am new to creating games and such so i have no clue what to do next or how to fix it. Any suggestions?
By the way it is unity 4.5.5
When the compiler says that it didn’t “expect” something, or that something was “unexpected”, it generally means that the compiler expected something else to happen (i.e. it’s wondering where the semi-colon is).
It’s a good thing to keep in mind - with this sort of warning, you generally want to look at the code just before the code that it’s complaining about.