- Home /
How to solve the error:BCE0018: The name 'GameObjet' does not denote a valid type ('not found')?
How to solve the error:BCE0018: The name 'GameObjet' does not denote a valid type ('not found').please Here is my script:var capsuleSound : AudioClip; var looseSound : AudioClip;
var looseGame : String;
var couleurs : Transform;
var score = 0;
private var porte1 : GameObjet; porte1 = GameObject.Find("porte");
function OnTriggerEnter(objetInfo : Collider) { if(objetInfo.GameObject.tag =="Caps") { audio.PlayOneShot(capsuleSound); Instantiate(couleurs,transform.position,transform.rotation); Destroy(objetInfo.gameObject); score += 1; } else if(objetInfo.GameObject.tag =="water") { audio.PlayOneShot(looseSound); yield WaitForSeconds(3.0); Application.LoadLevel(looseGame); } else if(objetInfo.gameObject.tag == "porte"&& score >= 10) { porte1.transform.position.x +=2.4; } }
Answer by Lovrenc · Jan 09, 2013 at 11:40 PM
You missed the c. It is
private var porte1 : GameObject;
It's kinda funny when you see the error already in the question title ;)
Note that the error is constant
OnTriggerEnter(objetInfo : Collider
Thank you very very much and i love your good work thanx full.