SRL Archive - OSR Help

Weird error


Tickyy

2010-06-02 05:48:14

Error: Out Of Range at line 267
The following DTMs were not freed: [SRL - Lamp bitmap]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Program Files\Simba\Includes\SRL\Logs\SRL Log 02-06-10 5.txt] has not been freed in the script, freeing it now.



Function WalkMine: TPointArray;
begin
SetLength(Result, 11);
Result[0] := Point(3262, 3428);
Result[1] := Point(3270, 3429);
Result[2] := Point(3277, 3429);
Result[3] := Point(3283, 3428);
Result[4] := Point(3284, 3425);
Result[5] := Point(3287, 3413);
Result[6] := Point(3292, 3404);
Result[7] := Point(3291, 3392);
Result[8] := Point(3291, 3381);
Result[9] := Point(3288, 3373);
Result[10] := Point(3285, 3366);
end;

Procedure WalkToMine;
var
TPA: TPointArray;
i: integer;
begin
TPA := WalkMine;
For I := 0 to High(10) do
Begin
WalkToTile(TPA[i], 1, 1); // here
FindNormalRandoms;
end;
end;

Any idea?

nielsie95

2010-06-02 05:50:34

High(11)?

Tickyy

2010-06-02 05:53:50

From: nielsie95
High(11)?


that was a miss click of me, its actually 10.

Coh3n

2010-06-02 06:08:00

You should be doing this:

for i := 0 to High(TPA) do

Narcle

2010-06-02 06:08:15

I suggest High(TPA)

E:
Ninja'd

Also Tiles are in TTiles. Tile(x, y) etc.