That code doesn't even compile so it's obviously not going to work.
In loop() why are you setting a value in variable h (by dividing a pin number by 29.1) and then immediately creating a brand new variable with the same name and setting that from dht.readHumidity()? Which one do you expect would be used in your if statement?
Steve