Okay, this is really weird.

On another part of my program, I have a debugger z value on a panel, and it shows the player's z value at all times, even while it is in mid-air:

Code:
...

var player_z;

...

PANEL* pDisplay =
{
   ...

   digits (180, 64, 5, *, 1, player_z); // DEBUGGER:  POSITION COORDINATES
	
   ...

   flags = SHOW;
}

function player_loc()
{
   ...

   player_z = my.z;
	
   ...
}



For the DEBUG_VAR() debugger:

Code:
action player_code()
{
   ...

   DEBUG_VAR(my.z, 300);

   ...
}


or
Code:
action player_code()
{
   ...

   DEBUG_VAR(player_z, 300);

   ...
}



...the z value only shows up while the player is on the ground, and totally disappears while the player is in mid-air.