It's because your whole level has the same collision type number. So if you jump against the wall, the function takes that as being the collision it's looking for.
Another thing. Because i'm using a function, you really should make all of your variables global. Just incase they get mixed up with the ones used in the function.
Mmmm. What you could do to solve your problem is when a collision is dected in the function, do a linepick straight down (see the linepick command). Then get the distance, and if it's very small, say 0.5 or less then stop the jump, but if it's not then continue to make the player fall.
Another thing. Because i'm using a function, you really should make all of your variables global. Just incase they get mixed up with the ones used in the function.
Mmmm. What you could do to solve your problem is when a collision is dected in the function, do a linepick straight down (see the linepick command). Then get the distance, and if it's very small, say 0.5 or less then stop the jump, but if it's not then continue to make the player fall.