hy unity community
in my code i have a error
the unity says:
BCE0034: Expressions in statements must only be executed for their side-effects.
Whats the error?
this is my code ,and in the function dead the code was wrong.
help me! please!
#pragma strict
static var aihp:float;
var aidif:float;
function Start () {
}
function Update () {
if(aidif == 1){
aihp=10;
}
if(aidif == 2){
aihp=20;
}
if(aidif == 3){
aihp=50;
}
if(aidif == 3){
aihp=50;
}
if(aidif == 4){
aihp=500;
}
if(aihp<1){
Dead();
}
}
function Dead(){
GameObject.Destroy;
}