I was making a code to make a toggable flashlight. this is what i did and this is the error i got.
Assets/Scripts/Flashlight.js(1,1): BCE0044: expecting EOF, found ‘on’.
here is my script
on : boolean = false; //this is the line it said
function Update()
{
if(Input.GetKeyDown(KeyCode.F))
on = !on;
if(on)
light.enabled = true;
if(!on)
light.enabled = false;
}