SRL Archive - Help and Support

Ent Finder Trouble


Torrent of Flame

2008-12-20 12:58:52

So I'm modifying BH's Ent Finder, and it keeps coming up with;

Line 116: [Error] (16497:9): Semicolon (';') expected in script

Line 116 being the 'EntColor[0] := 1057205;' part.


procedure EntFinder;
var EntWait: integer;
EntColor: integer;
begin
EntColor[0] := 1057205;
EntColor[1] := 3236698;
EntColor[2] := 3756634;
EntColor[3] := 2194283;
for i:= 0 to 3 do
if FindObjTPA(x, y, EntColors[i], 30, 2, 15, 25, 10, ['Chop', 'hop', 'op Do', 'Down']) then
begin
Writeln('Found Ent');
MarkTime(EntWait);
repeat
FTWait(5);
FindNormalRandoms;
if not (LoggedIn) then
NextPlayer(False);
until TimeFromMark(SafeEntWait) > 20000 + Random(5000);
end;
end;

Any help greatly appreciated :o

Cazax

2008-12-20 13:37:33

EntColor isn't an array, you declared it as integer.

Torrent of Flame

2008-12-20 14:17:50

procedure EntFinder;
var EntWait: integer;
EntColor: array [0..3] of integer;
begin
EntColor[0] := 1057205;
EntColor[1] := 3236698;
EntColor[2] := 3756634;
EntColor[3] := 2194283;
for i:= 0 to 3 do
if FindObjTPA(x, y, EntColor[i], 30, 2, 15, 25, 10, ['Chop', 'hop', 'op Do', 'Down']) then
begin
Writeln('Found Ent');
MarkTime(EntWait);
repeat
FTWait(5);
FindNormalRandoms;
if not (LoggedIn) then
NextPlayer(False);
until TimeFromMark(EntWait) > 20000 + Random(5000);
end;

Works. Thanks Cazax.

NiCbaZ

2008-12-20 20:34:25

Have you tried the ent finder in woodcutting.scar?

Torrent of Flame

2008-12-21 04:16:47

I could do, I didn't even know there was one.

I'll have a looksies.

n3ss3s

2008-12-21 05:46:28

Jesus christ! You using FindObjTPA as Ent Finder?

You should make one that doesn't depend on moving the mouse over the tree…

Torrent of Flame

2008-12-21 06:41:16

Im using the SRL one. Dont worry..