how can we count each time a script has performed successfully and write it in the debug box?
how can we count each time a script has performed successfully and write it in the debug box?
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}
Last edited by Recursive; 05-18-2012 at 06:52 AM.
Simba Code: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
Last edited by zluo; 05-18-2012 at 08:16 AM.
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.
Simba Code:program new;
var
Count :Integer;
procedure Main;
begin
repeat
//DoSomething;
ClearDebug;
Inc(Count);
WriteLn(IntToStr(Count));
until(false);
end;
begin
Main;
end.
~Home
There are currently 1 users browsing this thread. (0 members and 1 guests)