SRL Archive - Help

Counting each time the script repeats successfully


zluo

2012-05-18 02:46:04

how can we count each time a script has performed successfully and write it in the debug box?

Recursive

2012-05-18 02:49:06

Inc(Count);
writeln(Inc(Count) + 'number of runs');
{Increases count by 1 each time it is successful}

incex(Count, Up);
writeln(Incex(Count, Up) + 'number of items made');
{Increases count by the number passed to up
So if you pass 2 to Up and Count is at 5, after this runs, Count = 7}

zluo

2012-05-18 04:12:13

procedure Main;
begin
repeat
DoSomething;
ClearDebug;
Inc(Count);
writeln(Inc(Count) + 1);
until(false);
end;

is this correct? because its not compiling correctly, and ihave no idea what i have done wrong

edit: nvm figured what i done wrong, thanks anyway

Home

2012-05-18 04:33:13

When you you solve it on your own, I suggest you to post the ix for everyone (If someone is having some what same problem).


Fixed version.

program new;



var
Count :Integer;

procedure Main;
begin
repeat
//DoSomething;
ClearDebug;
Inc(Count);
WriteLn(IntToStr(Count));
until(false);
end;



begin
Main;
end.


~Home