system
1
Assets/water/BulletFireScript.cs(33,247): error CS1525: Unexpected symbol `end-of-file’
what is this error? I tried fixing but nothing… its pointing to the last 3 brackets yes they are correct brackets
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BulletFireScript : MonoBehaviour {
public float fireTime = .05f;
public GameObject bullet;
public int pooledAmount = 20;
List< GameObject> bullets;
void Start () {
bullets = new List <GameObject> ();
for (int i = 0; i < pooledAmount; i++) {
GameObject obj = (GameObject)Instantiate (bullet);
obj.SetActive (false);
bullets.Add (obj);
}
InvokeRepeating ("Fire", fireTime, fireTime);
}
void Fire()
{
for (int i = 0; i < bullets.Count; i++)
{
if (!bullets *.activeInHierarchy) {*
_ bullets .transform.position = transform.position;_
_ bullets .transform.rotation = transform.rotation;_
_ bullets .SetActive (true);
* break;
}
}
}*_
It looks like you’re missing a closing bracket at the end of your script. I count 6 opening brackets and only 5 closing brackets.