"Wall detected" fail. (wall jump-2d)

![alt text][1]Hi everyone, sorry for my bad english
I have a problem with my megaman character when he slides and jumps a wall. He does these actions perfectly until he reaches the edge of the wall. At that moment, he falls uncontrollably without being able to detect the wall while it is falling. After he falls and is on the floor. I cant move towards the direction of the wall. I have discovered that the error is in wall detection, but the programming is the same as that taught in several tutorials. I don’t know what to do!
:frowning: