Invalid function

There is no WhilePressed function. It is called WhileHeld(..) instead.