- Home /
Question by
shlomito36 · Mar 09, 2013 at 06:18 PM ·
errorvariable
error modifying a var
#pragma strict
function OnTriggerEnter (OtroObjeto : Collider)
{
if (OtroObjeto.tag == "Die"){
Application.LoadLevel(Application.loadedLevel);
}
else if (OtroObjeto.tag == "Win"){
Win == true;
}
}
i get an error at line 9,12 BCE0034: Expressions in statements must only be executed for their side-effects.
thank you!
Comment
Best Answer
Answer by OmarAlhaddad · Mar 09, 2013 at 06:53 PM
the (==) on line 8 is an equality check, if you wanted assignment (and you have a boolean called Win somewhere) you should use:
Win = true;
Hope that helps!