If you do, just remember that everything after that while loop won't happen until the pointer is valid.

function main might actually be a bad spot for such a loop, another alternative would be to just use "wait()"

or if you want to be absolutely sure, another way would be

Code:
function move_ahead()
{
  if(!robot) return;

  robot.x += 5;
}


Which terminates the function if robot is invalid, ergo no missing pointer.

Last edited by heinekenbottle; 02/05/09 19:33.

I was once Anonymous_Alcoholic.

Code Breakpoint;