Please insert semi colon... WHAT!?!

my computer keeps on saying that i don’t have a semi colon at the end of lines 22 and 18

My Scripts Below:

var speed = 24.0;

var rotateSpeed = 3.0;

var bullitPrefab:Transform;

function Update ()
{
var controller : CharacterController = GetComponent(CharacterController);
	
// Rotate around y - axis;

transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);
	
// Move forward / backward

var forward = transform.TransformDirection(Vector3.forward);

var curSpeed = speed * Input.GetAxis ("Vertical");

controller.SimpleMove(forward * curSpeed);
	
if(Input.GetButtonDown("X"));
	
var bullit:Instiniate (bullitPrefab) GameObject.Find("Spawn Point")transform.position Quaternion.identity;				

EOF;

script RequireComponent (CharacterController);EOF }

I don’t know the problem PLEASE HELP!!!

This error isn’t always what it pretends to be: other syntax errors may fool the compiler and produce this error message. The rule is simple: if the line already has a semicolon, the error is something else before the line.

The script above have several errors in the two last lines, which may generate this error:

if(Input.GetButtonDown("X"));
var bullit:Instiniate (bullitPrefab) GameObject.Find("Spawn Point")transform.position Quaternion.identity;	

The right thing should be something like this:

if (Input.GetButtonDown("X")){
    var bullit = Instantiate(bullitPrefab, GameObject.Find("Spawn Point").transform.position, Quaternion.identity);
    // the code to accelerate the "bullit" is missing, but resembles this:
    bullit.rigidbody.velocity = transform.forward * speed;
    Destroy(bullit.gameObject, 2.0); // kill lost bullets after 2 seconds
}

You should check the Tornado Twins worm tutorial more carefully (that’s where this came from) because there are more things missing - like the code to accelerate the projectile, for instance.

For sure,

if(Input.GetButtonDown("X"));

wasn't your intention. In fact, a semicolon after an if statement will break the statement immediately. Just remove ";" from that line.

Moreover, the next line is a mess ^_^ I don't know what you was trying to do there!