Originally Posted By: Ruben
Code:
action player_code()
{
   ...
   if(my.GRAVITY_VAR < -3.80)
   {
      beep(); // BEEP IS WORKING WHEN PLAYER IS FALLING,
              //    BEEPING LIKE CRAZY WHEN PLAYER FALLS

      timer(); // TIMER SHOULD START WHEN PLAYER FALLS
				
      if(my.GRAVITY_VAR >= -3.80)
      {
         time_elapsed = timer(); // TIMER SHOULD END WHEN 
                                 //    PLAYER LANDS ON GROUND,
                                 //    AND RECORD TIME IN
                                 //    time_elapsed VARIABLE
      }
   }
   ...
}



Aside from the pointed out nested "<" ">=" (which excludes the nested if from ever happening), I'll give you a tip on using these methods in a better way.
Making your gravity function separate from your player function gives you another possibility, to nest a while loop inside it.
Or even, separating the counting time function from the gravity function will still keep the gravity active while looping in its own while loop to count...

Meaning:
Code:
function fallTimeCounter() {
    while(1) {
        if( my.GRAVITY_VAR < -3.80 ) {
            timer();
            while( my.GRAVITY_VAR < -3.80 ) {
                wait(1);
            }
            time_elapsed = timer();
        }
        wait(1);
    }
}



Calling this in the beginning of your player or gravity function will make it work parallel to your gravity or player functions without interrupting them, but still counting the fall time.

Make sure that time_elapsed is a globally defined variable! (or a player skill, if you don't want global stuff.)


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201