Brand new to Unity and scripting and I need help with 1st project

I am doing my first tutorial (Roll A Ball) and I’ve followed along fine, but in the 3rd section of the tutorial before playing the game I receive a NullReferenceException error and do not know what this means, I’ve followed along, retraced my steps but still cannot find a solution. It says object reference not set to instance of an object even though I added the script component to the PlayerObject(the ball), all answers are appreciated and I’m sorry if this question is too nooby.

Null Reference Exception means whatever your code is trying to access doesn’t exist. What is the line that this error pops up on? (double click the error in the console and Unity will open Mono on the exact line the error is on)

Make sure all variables in the Inspector have been filled out, first, though.

Well now I opened it and tried to play and the ball doesn’t move and the X and Z axis are just flying around random numbers, null isn’t even showing up.

Please post the code that causes the error. Use code tags to do so and it’s the best to add the complete error message as well.

Sorry for the late reply guys, because I was early in the project I restarted. This time, it says nothing about Null Reference Exception. This time it says, "error CS1525 unexpected symbol ‘rb’. The rb function was being used to reference RigidBody in this code, here’s what the code looks like. It says the error is with the rb.AddFoce (movement); line of the code.

using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour {
private Rigidbody rb;
void start ()
{
rb = GetComponent();
}
void FixedUpdate ()
{
float movehorizontal = Input.GetAxis (“Horizontal”);
float movevertical = Input.GetAxis (“Vertical”);
Vector3 movement = new Vector3 (movehorizontal, 0.0f, movevertical)
rb.AddForce (movement);
}
}

void start () should be capital letter, void Start ()

Now it is also saying Null Reference Exception for rb.addforce(movement); why is Unity doing this to me? It works just fi

Thanks! I got it to work with no errors! However, the ball isn’t really moving when I use the WASD keys, and I clicked the player to view the X,Y,Z axis and it’s basically spastic. Why is this? Here’s the code this time:

using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour {
private Rigidbody rb;

void Start ()
{
rb = GetComponent();
}

void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis (“Horizontal”);
float moveVertical = Input.GetAxis (“Vertical”);

Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);

rb.AddForce (movement);
}
}

Nevermind, sorry I didn’t realize you shouldn’t click on objects when testing, obviously I’m very new to this, but that helped and solved a lot of frustration, thanks.

[ code] [ /code] tags…
thats a link in there… http://forum.unity3d.com/threads/using-code-tags-properly.143875/

they format the code you paste in so it’s more readable (and saves having to bold it etc.)