Expecting }, found 'static'

Also:
expecting EOF, found ‘}’.

#pragma strict

var rotationSpeed = 100;

function Update ()
{
	var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
	rotation *= Time.deltaTime;
	static Rigidbody.AddRelativeForce (Vector3.back * rotation);
}

Without the ‘static’ on the second to last line it would give me an error telling me i cannot use non-static variables with static variables.

Hi,
Is there a reason why you can’t use a getcomponent rigibody?
GetComponent().AddRelativeForce(Vector3.back * rotation);

No reason, im just very new to all this - didn’t know about it.

Line 9 is also supposed to be ‘AddRelativeTorque’. Not force - forgot to change it back when playing around with it.

It still worked though with:

#pragma strict

var rotationSpeed = 100;


function Update ()
{
	var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
	rotation *= Time.deltaTime;
	GetComponent(Rigidbody).AddRelativeTorque (Vector3.back * rotation);
}

Many Thanks my friend.