SRL Archive - OSR Help

Arrays


NKN

2012-03-27 20:07:04

So, I'm trying to create my own array of colors that I can use for finding something. Haven't really used Arrays before, and I keep getting Mismatch error.

Can someone point me into the direction of a guide/tutorial or explain what the different arrays are? I can't seem to find any. Here is the code that I'm working with.

procedure WalkToBank;
var
i,x,y:Integer;
DepositColors:TIntegerArray;
begin
if not LoggedIn then Exit;
Antiban;
for i := 4 to 6 do
begin
FFlag(0);
Wait(500+random(200));
Writeln('On way back to bank, number' + IntToStr(i - 3));
WalkingSpec(i);
end;
if(FindSymbol(x,y,'bank')) then
begin
Mouse(x,y,3,3,True);
end;
repeat
DepositColors := [4747939,6777452,4808814,3491408]
if(FindColorSpiralTolerance(x,y,DepositColors,MSX1,MSY1,MSX2,MSY2,4)) then

I get the error at the last line in that.

Kyle Undefined

2012-03-27 20:09:09

That function only accepts one color, you'll have to loop thorough them :)

NKN

2012-03-27 20:10:35

So there is no way to have an array of colors like what I was doing?

Kyle Undefined

2012-03-27 20:11:46

Sorry, had to edit my response. Read the code wrong :p

NKN

2012-03-27 20:17:40

No problem bout it. xD
Found your TPointArray guide, I'm going to use it, so I'm repping you for that one because I'm too lazy to switch tabs. And repping for these posts, obv. ;)