This article is from the Table Tennis (Ping Pong) FAQ, by ttennis@bu.edu with numerous contributions by others.
3.16.1 If a player serves or receives out of turn, play shall be interrupted
by the umpire as soon as the error is discovered and shall resume with
those players serving and receiving who should be server and receiver
respectively at the score that has been reached, according to the
sequence established at the beginning of the match and, in doubles, to
the order of serving chosen by the pair having the right to serve first
in the game during which the error is discovered.
3.16.2 If the players have not changed ends when they should have done so, play
shall be interrupted by the umpire as soon as the error is discovered
and shall resume with the players at the ends at which they should be
at the score that has been reached, according to the sequence
established at the beginning of the match.
3.16.3 In any circumstances, all points scored before the discovery of an error
shall be reckoned.
 
Continue to: