Unity keeps giving me errors on this script
If any one can help me, please do.
using UnityEngine;
using System.Collections;
public class refuelBox : MonoBehaviour
{
void Start ()
{
GameObject.FindGameObjectWithTag("Ship").GetComponent < shipControls > ().Update();
}
public float reFuelamount()
{
fuelAmount (fuelAmount + 10);
return fuelAmount;
}
void Update()
{
Line 25: float OnTriggerEnter(Collider other)
{
if (other.tag == "Ship")
{
reFuelamount();
}
}
Line 32:}
}
I can not see whats wrong with it.
Error 1: Assets/game/refuelBox.cs(25,30): error CS1525: Unexpected symbol (', expecting
)‘, ,',
;’, [', or
=’
and
Error 2: Assets/game/refuelBox.cs(32,5): error CS8025: Parsing error