i have a parsing error on this script
heres the error
Assets/scripts/Flashlight.cs(46,9): error CS8025: Parsing error
and this is the afore mentioned script
using UnityEngine;
using System.Collections;
public class Flashlight : MonoBehaviour {
public Light FlashLightObject;
public float Batterypower = 1000.0f;
void Start()
{
FlashLightObject.enabled = false;
}
void Update ()
{
//on/off
if(Input.GetKeyDown(KeyCode.F))
{
if(FlashLightObject.enabled == false){
FlashLightObject.enabled = true;
}
else
{
FlashLightObject.enabled = false;
}
//power management
if (FlashLightObject.enabled == true)
{
Batterypower -= 1.0f;
}
// no power
if (Batterypower <= 0)
{
FlashLightObject.enabled = false;
Batterypower = 0;
}
}
}
di i have to many or not enough curly braces
thank you
– 10chaos1