You should get the result of the trace -- that's the distance between the from-vector to the to-vector (like so: result = c_trace...; although result is automatically set anyway as far as I know).

If result == 0, nothing was hit, so the player should fall.

Your problem is that nothing is being hit, so the hit.z isn't being set.

I hope that makes sense.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!