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

Type could not be resolved because of cycle

$
0
0
I made a simple Javascript flamethrower but I get this error: Assets/FlameThrower.js(30,9): BCE0070: Definition of 'FlameThrower.ShootShort()' depends on 'FlameThrower.ShootLong()' whose type could not be resolved because of a cycle. Explicitly declare the type of either one to break the cycle. Does anyone know how to solve it? Below here is my code: var longShot : boolean = false; var shortShot : boolean = false; var particleLong : GameObject; var particleShort : GameObject; var damageBoxLong : GameObject; var damageBoxShort : GameObject; function Start () { ShootLong(); } function ShootLong () { particleLong.gameObject.SetActive (true); damageBoxLong.gameObject.SetActive (true); particleShort.gameObject.SetActive (false); damageBoxShort.gameObject.SetActive (false); yield WaitForSeconds (3); ShootShort (); return; } function ShootShort(){ particleLong.gameObject.SetActive (false); damageBoxLong.gameObject.SetActive (false); particleShort.gameObject.SetActive (true); damageBoxShort.gameObject.SetActive (true); yield WaitForSeconds (1); ShootLong (); return; }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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