Hello, here is my small issue.
I have a key pad that the user has to put a number to unlock the door. I made a gui.label that displays numberString (wich is just a String) if they put more then 5 digits, it displays Error! in the label.
To validate if it’s the correct code, the user push the C button on the screen and it runs that function :
function checkME()
{
if (numberString == "1234")
{
numberString += "_Access_Granted_";
openDoor.gameObject.animation.Play("door_open");
print ("Working Mademoiselle!");
}
if (numberString != "1234")
{
numberString = "_Access_Denied_";
print ("bad puppy");
}
}
The issue is, once they click the C button on the keypad, it’s suppose to Display Granted or Denied depending if it’s right or false. What happens instead, is nothing is being displayed.
Any idea?
[Edit by Berenger : Code formatting and other minor changes]