Hi guys. I'm trying write restart game code when something hit the floor:
function Start(){
var thisLevel : int= Application.loadedLevel;
print(thisLevel);
}
function OnTriggerEnter (other : Collider) {
Application.LoadLevel (thisLevel);
}
I got: Assets/-MyScripts/RestartLevel-1.js(7,32): BCE0005: Unknown identifier: 'thisLevel'. Why 'thisLevel' is unknown?
thanks for any answer