How to transfer the last known value of a looping variable to other variable?

I followed instructions but still getting 0 when dead, not the value of distance travelled saved in run.