BCE0044: expecting :, found "=".

Hi,

I want to make a script, but the console shows me that I need to insert another character. The problem is that it is correct. Help!

Here is a script:

var tekst : GUIText;
var fpc : GameObject;
var bron : GameObject;
var vis : boolean;
var Hand : GameObject;

var distance;

static var bronZabrana : boolean = false;


function OnBecameVisible() {

vis = true;

}

function OnBecameInvisible () {

vis = false;

}

function Update() {

distance = Vector3.Distance(bron.transform.position, fpc.transform.position);

}



if ((distance < 1.1)  (vis == true)); {

tekst.enabled = true; //Here is the error

}


if ((Input.GetKeyDown("f")); {



bronZabrana = true;
tekst.enabled = false;
bron.transform.parent = Hand.transform;

}



if ((vis == false) || (distance > 1.1)) {

tekst.enabled = false;

}

if ((distance < 1.1) (vis == true)); {’

to

if ((distance < 1.1) (vis == true)) {

and also remove the semi-colon from line 39. (When you say “it is correct”, I think you mean “I think it is correct, but the compiler tells me I am wrong”.)

There are a lot of typo problems. Line 39 is also imbalanced with three open-parenthesis and two close-parenthesis.

As for the error message, are you sure you named your script with the correct extension?