problem with my if statment

tryed another pin and its ok, must be a faulty pin/board

thanks very much for the help, really appreciate it