Rich
2011-03-29 11:35:44
procedure GetBankSlots;
var
BBox : TBoxArray;
X, Y, I : Integer;
UpTexts : TStringArray;
begin
OpenTheBank;
FixBank;
BBox[0]:= BankIndexToMSBox(1); //THIS LINE
BBox[1]:= BankIndexToMSBox(2);
BBox[2]:= BankIndexToMSBox(3);
for I:= 0 to......Error: Out Of Range at line 296Not really sure what could be causing that. Any ideas? There is more after the for..to..do loop, but it's not relevant.
EDIT: Fixed. Changed to
BBox:= [BankIndexToMSBox(1), BankIndexToMSBox(2), BankIndexToMSBox(3)];EDIT2: Original error was because I didn't set array length.