austin2162
05-11-2011, 10:41 PM
Im working on a timer for a progress report and i cant get it to add to mins.
here is my progress report code.
procedure proggy;
var
hr,mins,time,time1:integer;
begin
time:=getsystemtime - starttme
time1:=time/1000
if mins = 60 then
begin
mins:= 0
hr:= hr +1
end;
if time1 = 60 then
begin
starttme:= getsystemtime
mins:= mins +1
time1:= 0
end;
cleardebug;
writeln('-------------------------------------------------------------------------------------------------------------------------------------------------------');
writeln('|Estimated total xp = '+ inttostr(xptotal)+' xp. | Total estimated cash gain = '+inttostr(cshgain)+' g.|');
writeln('|Estimated total class xp = '+ inttostr(clstotal)+' xp.|');
writeln('|Total fights = '+inttostr(ftstotal)+'.|');
writeln('|Currently: '+gmstatus+'.|');
writeln('|Time running = '+inttostr(hr)+' hours, '+inttostr(mins)+' minutes, '+inttostr(time1)+' seconds.|');
writeln('|AdventureQuestWorlds fighter beta by austin2162 |');
writeln('-------------------------------------------------------------------------------------------------------------------------------------------------------');
end;
here is the issue though
hers the print out.
as you see one minute is added
-------------------------------------------------------------------------------------------------------------------------------------------------------
|Estimated total xp = 0 xp. | Total estimated cash gain = 0 g.|
|Estimated total class xp = 0 xp.|
|Total fights = 0.|
|Currently: Debuging.|
|Time running = 0 hours, 1 minutes, 0 seconds.|
|AdventureQuestWorlds fighter beta by austin2162 |
-------------------------------------------------------------------------------------------------------------------------------------------------------
this is the next report
-------------------------------------------------------------------------------------------------------------------------------------------------------
|Estimated total xp = 0 xp. | Total estimated cash gain = 0 g.|
|Estimated total class xp = 0 xp.|
|Total fights = 0.|
|Currently: Debuging.|
|Time running = 0 hours, 0 minutes, 1 seconds.|
|AdventureQuestWorlds fighter beta by austin2162 |
-------------------------------------------------------------------------------------------------------------------------------------------------------
any help?
edit: Im using simba
here is my progress report code.
procedure proggy;
var
hr,mins,time,time1:integer;
begin
time:=getsystemtime - starttme
time1:=time/1000
if mins = 60 then
begin
mins:= 0
hr:= hr +1
end;
if time1 = 60 then
begin
starttme:= getsystemtime
mins:= mins +1
time1:= 0
end;
cleardebug;
writeln('-------------------------------------------------------------------------------------------------------------------------------------------------------');
writeln('|Estimated total xp = '+ inttostr(xptotal)+' xp. | Total estimated cash gain = '+inttostr(cshgain)+' g.|');
writeln('|Estimated total class xp = '+ inttostr(clstotal)+' xp.|');
writeln('|Total fights = '+inttostr(ftstotal)+'.|');
writeln('|Currently: '+gmstatus+'.|');
writeln('|Time running = '+inttostr(hr)+' hours, '+inttostr(mins)+' minutes, '+inttostr(time1)+' seconds.|');
writeln('|AdventureQuestWorlds fighter beta by austin2162 |');
writeln('-------------------------------------------------------------------------------------------------------------------------------------------------------');
end;
here is the issue though
hers the print out.
as you see one minute is added
-------------------------------------------------------------------------------------------------------------------------------------------------------
|Estimated total xp = 0 xp. | Total estimated cash gain = 0 g.|
|Estimated total class xp = 0 xp.|
|Total fights = 0.|
|Currently: Debuging.|
|Time running = 0 hours, 1 minutes, 0 seconds.|
|AdventureQuestWorlds fighter beta by austin2162 |
-------------------------------------------------------------------------------------------------------------------------------------------------------
this is the next report
-------------------------------------------------------------------------------------------------------------------------------------------------------
|Estimated total xp = 0 xp. | Total estimated cash gain = 0 g.|
|Estimated total class xp = 0 xp.|
|Total fights = 0.|
|Currently: Debuging.|
|Time running = 0 hours, 0 minutes, 1 seconds.|
|AdventureQuestWorlds fighter beta by austin2162 |
-------------------------------------------------------------------------------------------------------------------------------------------------------
any help?
edit: Im using simba