My dad is trying to teach me SCAR and has experience with Pascal and other programing languages. This is our first script:
program New;
function factorial (n : integer): integer;
var i, res: integer;
begin
res:=1;
i:=1;
while (i<=n) do
begin
res:=res*i;
i:=i+1;
end;
factorial:=res;
end;
begin
Writeln(IntToStr(factorial(10)));
end.
___________________
We get the following error:
Line 13: [Error] (13:10): Invalid number of parameters in script C:\Users\Grisha\Desktop\first script.scar
Thank you for your help!


Reply With Quote








