g0tp0t
2010-03-19 10:33:04
i need to make a colage(a bunch of pics pasted on a poster.) for class and i decided to do it with scar. heres my code that doesnt work :/
and i get this error:
program New;
var i:integer;pic,npic: array of integer;
procedure Declareanddraw;
begin
wait(1000) //so i can pause and go through line by line before error
for i := 0 to 9 do
pic[i] := Loadbitmap('C:\bit\images_00'+inttostr(i)+'.bmp'); //load bmps into array
FastDrawTransparent(random(150)*i,random(150)*i,pic[i],npic[i]); //The higher i is the forther the pic will be drawn
//instead of drawing them on top of each other
||
for i := 10 to 19 do // \/------- since the filename has a three digit number i had to remove a 0
pic[i] := Loadbitmap('C:\bit\images_0'+inttostr(i)+'.bmp');
FastDrawTransparent(random(150)*i,random(150)*i,pic[i],npic[i]);
end;
begin
declare
end.and i get this error:
Successfully compiled (57 ms)
[Runtime Error] : Out Of Range in line 8 in script