If you are definately using the pointer "player" in all your script then it shouldnt be a problem.

Its probably just a timing issue. That is, if the "moveit" function starts BEFORE player gets assigned, then the problem occurs...
Here are two suggestions for "moveit" to bypass the problem, my perferred one is the second one.

Code:
//commonly used process
function moveit
{ 
   while(player==NULL)    {  wait(1);  }
   while (platform.x<200)
   {
      platform.x+=2*time;
      player.x+=2*time;
      wait(1);
   }
} 


//my preferred process
function moveit
{ 
   while (platform.x<200)
   {
      platform.x+=2*time;
      if(player!=NULL)    {  player.x+=2*time;  }
      wait(1);
   }
}


Mind you, I assume you are aware that this code isnt checking to be sure the player is actually ON the platform?
If they step off it whilst it is moving, they'll continue to be moved by it....


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial