- Home /
Question by
crazyking_max · Jan 28, 2013 at 04:37 PM ·
javascripterror
Unknown identifier "If" (Javascript)
Hi everyone, i've written a simple script in javascript to make the character respawn when he falls after the edges of the floor. However, Mono keeps saying that there is an error: BCE0005 Unknown identifier "If". This is the code:
function Update ()
{
If(transform.position.y<-100)
{
transform.position.y=8;
transform.position.x=75;
transform.position.z=12;
}
}
Where did i go wrong?
Comment
Answer by kat0r · Jan 28, 2013 at 04:40 PM
You have to use "if". Capitalization matters in almost every programming language.
You are right, didn't know it was case sensitive. I feel really stupid about this :D Thank you anyway!