Quote Originally Posted by wodzu
Quote Originally Posted by Wizard
Thanks for the replies guys :-)

PStudio, with your solution the Lifes goes to 5 and stays that way ...?
Becasue LivesLeft is not incremented.

It should be like this:

Code:
procedure TFormGame.BonusLife;
begin
  if Points mod 25000 = 0 then 
  begin
    Inc(LivesLeft,2);
    Lives := LivesLeft;
  end;
end;
You're right. I just missed that part in my confussion as to why those to vars exists.

@Huehnerschaender
Actually he doesn't mention that 25001 is life giving score, but else you're right. Unless of course he's incrementing the score with a value that guarentees him to end on 25000.

@Wizard
As Dirk points out, you should make sure that the game doesn't increase your life vars. If I were you I would only call BonusLife when the score changes instead of doing it all the time.