I’m Making A C# script to pick up a flash light but keep getting an error on line 26,1 parsing error? How do i fix it?
`using UnityEngine;
using System.Collections;
public class PickUp : MonoBehaviour
{
public enum Item
{
Flashlight,
Battery
}
public Item item;
void OnTriggerEnter()
{
if (item == Item.Flashlight)
{
HUD.HasFlashlight = true;
}
else
HUD.BatteryCount++;
Destroy(gameObject);
{
}
`
For any help, please format your code. You can do this by highlighting all your code, then clicking the 10101 button at the top of the edit window : http://video.unity3d.com/video/7720450/tutorials-using-unity-answers
– AlucardJay