Log in

View Full Version : another progress report question



geerhedd
04-29-2007, 07:24 PM
Hello all and good morning, im having a progress report problem,
my progress report is working, although not properly. It posts every 45 seconds or so, and i want to slow it down to about 5 or ten minutes. I have it on a repeat. i made a switch (ProgTog: boolean;) and a trigger, (variable Progswitch: integer) in my theiving loop (is a stealer) i have


var
ProgSwitch:integer;

(at the end of theiving cycle)

Progswitch:=progswitch+1;


Function ProgTog:Boolean;
begin
result:=false;
If ProgSwitch > 10 then result:=true
end;

(I then pull pull ProgressReport; out of main cycle and and change it to)


If (Progtog=true) then
begin
ProgressReport;
Progswitch:=ProgSwitch-10;
end;

but after two hours of running, still no report, any ideas what im doing wrong?
any help greatly welcomed, thank you GEERHEDD.

inSane
04-29-2007, 09:00 PM
Hello all and good morning, im having a progress report problem,
my progress report is working, although not properly. It posts every 45 seconds or so, and i want to slow it down to about 5 or ten minutes. I have it on a repeat. i made a switch (ProgTog: boolean;) and a trigger, (variable Progswitch: integer) in my theiving loop (is a stealer) i have


var
ProgSwitch:integer;

(at the end of theiving cycle)

Progswitch:=progswitch+1;


Function ProgTog:Boolean;
begin
result:=false;
If ProgSwitch > 10 then result:=true
end;

(I then pull pull ProgressReport; out of main cycle and and change it to)


If (Progtog=true) then
begin
ProgressReport;
Progswitch:=ProgSwitch-10;
end;

but after two hours of running, still no report, any ideas what im doing wrong?
any help greatly welcomed, thank you GEERHEDD.

Next time when you post a problem / error please use SCAR tags!

Replace
Progswitch:=ProgSwitch-10;
with
Progswitch:=0;

and instead of
If(ProgSwitch>10)then
you may use this, so when its 10 or bigger it results true:
If(ProgSwitch>=10)then

and i made a little testing thing and it worked:

program New;
{.include srl/srl.scar}

var
ProgSwitch:integer;

Function ProgTog:Boolean;
begin
result:=false;
If(ProgSwitch>=10)then
result:=true
end;

begin
SetupSRL;
NEWLINE:='';
repeat
Progswitch:=Progswitch+1;
until(ProgTog)
If(Progtog=true)then
begin
// ProgressReport; //un-comment in your script
Progswitch:=0;
end;
end.

I hope this fixed your problem!

geerhedd
04-29-2007, 11:31 PM
Thank you, is working great now, it was still a little too fast, so i changed 10 to 15 , now progress reports come every 6 minutes.big help thanx.

inSane
04-30-2007, 09:25 AM
Thank you, is working great now, it was still a little too fast, so i changed 10 to 15 , now progress reports come every 6 minutes.big help thanx.

Np, this is a good community ;)