Jump to content

Iña

Members
  • Content Count

    4
  • Joined

  • Last visited

Everything posted by Iña

  1. Iña

    Timer game delphi 7

    I making a game of who writes the word faster, store it in an array, and then show in a memo. my problem is when the minutes>0 the seconds are still running(the seconds doesn´t start at 0 again), so the only thing i need is when t is 60000(60 seconds) it should start at 0 again(the seconds) procedure TForm1.Button1Click(Sender: TObject); type people=array[1..2] of string; peopletime=array[1..2] of integer; var string1,text:string; time:integer; k,seconds:integer; p:people; p1:peopletime; t,minutes:cardinal; begin memo1.Lines.Clear; k:=1; p[1]:='James'; p[2]:='Dan'; repeat t:=gettickcount; timer1.Enabled:=true; if text='day' then begin t:=gettickcount-t; seconds:=t div 1000; minutes:=t div 60000; form1.Memo1.Lines.add(p[k]+' '+inttostr(minutes)+' '+'minutes'+' '+inttostr(seconds)); k:=k+1; timer1.Enabled:=false; end; until k=3; end;
  2. Iña

    Timer game delphi 7

    Thx @Lajos Juhász [solved]
  3. Iña

    Timer game delphi 7

    I forgot to paste this Text:=inputbox('enter the word','',''); it goes above the if
  4. Iña

    Timer game delphi 7

    How i do that? I'm a newbie with timers
×