this is bugging me, never ever ever ever ever EVER use repeat(false);
i know your a beginer but its really oneof my pet peves, what that does is keep repeating for ever and ever.
SCAR Code:
program script;
{.Include srl/srl.Scar}
var
counter: integer;
const
Message1='lending out godsword!';
procedure lending;
begin
wait(4000+random(1000));
writeln(Message1);
counter:=counter+1; //this counts how many times you have used the procedure, and ever time you do, it adds one, make sure you declare it as an integer in variables
end;
begin
ActivateClient;
repeat
lending;
until(counter=5{or how many times you want to use it})
end.
orrr what a lot of people dont is label,:
SCAR Code:
program script;
{.Include srl/srl.Scar}
var
counter: integer;
label
ReDo;//you can name this any thing.
const
Message1='lending out godsword!';
procedure lending;
begin
wait(4000+random(1000));
writeln(Message1);
counter:=counter+1; //this counts how many times you have used the procedure, and ever time you do, it adds one, make sure you declare it as an integer in variables
end;
begin
ActivateClient;
ReDo:
lending;
if counter < 5 then goto ReDo;
end.
when you get into more complex scripts with more repeats you will find yourself using this a lot more, i find that its very usefull
hope i helped =D you dont need to give me rep