i keep getting an unexpected var notification. Does anyone know what is wrong?
var ChController : Transform;
var inside : boolean = false;
var heightFactor : float 0.18501;
private var FPSInput : FPSInputController;
function Start ()
{
FPSInput = GetComponent(FPSInputContoller);
}
function OnTriggerEnter(Col : Collider)
{
if(Col.gameObject.tag == "Ladder")
{
FPSInput.enabled = false;
inside = !inside;
}
{
function Update()
{
if(Col.gameObject == "Ladder")
{
FPSInput.enabled = true;
inside = !inside;
}
}
function Update()
{
if(inside == true && Input.GetKey("w"))
{
ChController.transform.positon += Vector3.up / heightFactor;
}
}
,var ChController : Transform;
var inside : boolean = false;
var heightFactor : float 0.18501;
private var FPSInput : FPSInputController;
function Start ()
{
FPSInput = GetComponent(FPSInputContoller);
}
function OnTriggerEnter(Col : Collider)
{
if(Col.gameObject.tag == "Ladder")
{
FPSInput.enabled = false;
inside = !inside;
}
{
function Update()
{
if(Col.gameObject == "Ladder")
{
FPSInput.enabled = true;
inside = !inside;
}
}
function Update()
{
if(inside == true && Input.GetKey("w"))
{
ChController.transform.positon += Vector3.up / heightFactor;
}
}
,