Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

I'm getting this error: Assets\WaveSpawner.cs(33,19): error CS1002: ; expected and I have no idea where I'm going wrong

$
0
0
My code: using UnityEngine; using System.Collections; public class WaveSpawner : MonoBehaviour{ public Transform enemyPrefab; public Transform spawnPoint; public float timeBetweenwaves = 5f; private float countdown = 2f; private int waveNumber = 0; void Update () { if (countdown <= 0) { StartCoroutine(SpawnWave()); countdown = timeBetweenwaves; } countdown -= Time.deltaTime; } IEnumerator SpawnWave () { waveNumber++; for (int i = 0; i < waveNumber; i++) { SpawnEnemy(); yeild return new WaitForSeconds(0.5f); } } void SpawnEnemy () { Instantiate(enemyPrefab, spawnPoint.position, spawnPoint.rotation); } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>