SRL Archive - Help and Support

Looking for colon, phantom error.


R0b0t1

2007-08-16 15:34:04

Ok, when I try to compile this, it says it's missing an error where its like "Function BLABLA (here): Boolean;" But I do have a colon there…

And I'm like WTF?



Function R0bFindPickHead(Var r0bPickCol;): Boolean; //Input pick color.
Var I, B, C, PX, PY, x1, x2, y1, y2:Integer; //Use my function :)
Var LoopCount, r0bPickHeadColor, r0bPickHandle: Integer;
Var FoundHead, BreakLoop, Dropped: Boolean;
begin;
MakePickHeadDDTM;
r0bPickHandle:= DTMFromString('78DA63B461606038CE8002C4045918FE03694' +
'620FE0F048C0E40C61E0634C0C8C00A5503E6390189FD44A8D94B' +
'408D3990B84A408D2990B8885F0D00A6FC0B62');
r0bPickHead:= DTMFromString('78DA63CC63606038CA80028C8C5219FE03694' +
'620FE0F048C3940C6610634C0C8C00A5503E61503899304D49400' +
'893D04D42412360700DC550BDF');
For I:=0 to 6 do
begin;
Case I of
1: LoopCount:= 1;
2: LoopCount:= 2;
3: LoopCount:= 3;
4: LoopCount:= 4;
5: LoopCount:= 5;
end;
PX:= MSCX;
PY:= MSCY;
For B:=0 to 6 do
begin;
Case B of //Case by WT-Fakawi. I changed the letter :p
1: begin x1:= MSx1; y1 := MSy1 + 20; x2 := MSCx; y2:= MSCy; end;
2: begin x1:= MSCx; y1 := MSy1 + 20; x2 := MSx2; y2:= MSCy; end;
3: begin x1:= MSx1; y1 := MSCy; x2 := MSCx; y2:= MSy2; end;
4: begin x1:= MSCx; y1 := MSCy; x2 := MSx2; y2:= MSy2; end;
5: begin x1:= MSCx - 50; y1 := MSCy - 50; x2 := MSCx + 50; y2:= MSCy + 50; end;
6: begin x1:= MSx1; y1 := MSy1 + 20; x2 := MSx2; y2:= MSy2; end;
end;
For C:=0 to 10 do
begin;
BreakLoop:= FindColorSpiralTolerance(PX, PY, r0bPickCol, x1, y1, x2, y2, C);
If (BreakLoop) Then
Break;
end;
If not (BreakLoop) Then //If it doesn't find the pick color in the part
Continue; //of the MainScreen (above case) it goes to the
If BreakLoop Then //next loop.
begin;
Mouse(PX, PY, 1, 1, False);
Wait(500+Random(150));
If (ChooseOption(x, y, 'ake') Then
begin;
FFlag(0);
Wait(3000+Random(500));
FoundHead:= True;
Break;
end;
end;
If (FoundHead) Then
Break;
end;
If (FoundHead) Then
Break;
end;
If (FoundHead) Then
begin;
WriteLn('Found Head, Attaching...');
If not (GameTab(4)) Then
GameTab(4);
Wait(300+Random(200));
If (InvFull) Then
begin;
MouseItem(10+Random(5), False);
Wait(500+Random(200));
ChooseOption(x, y, 'rop');
Dropped:= True;
end;
end;
If (FindDTM(r0bPickHandle, PX, PY, MIX1, MIY1, MIX2, MIY2) Then
begin;
Mouse(PX, PY, 1, 1, False);
ChooseOption(x, y, 'se');
If (FindDTM(r0bPickHead, PX, PY, MIX1, MIY1, MIX2, MIY2)) Then
Mouse(PX, PY, 2, 2, True);
else
WriteLn('Could not find pick head in invy');
end else
begin;
WriteLn('Could not find pick handle');
end;
If (Dropped) Then
begin;
If not (FindDTM(r0bPickDTM, PX, PY, MIX1, MIY1, MIX2, MIY2)) Then
begin;
WriteLn('Problem locating finished pick');
Exit;
end;
Mouse(PX, PY, 3, 3, True);
WriteLn('We have attached the head.');
WriteLn('But we have dropped an item.');
WriteLn('Sorry. :)');
end;
end;
FreeDTM(r0bPickHandle);
FreeDTM(r0bPickHead);
FreeDTM(r0bPickDTM);
end;

LordGregGreg

2007-08-16 15:36:24

try something like this



Function R0bFindPickHead(r0bPickCol: Integer ): Boolean; //Input pick color.
Var I, B, C, PX, PY, x1, x2, y1, y2:Integer; //Use my function :)
Var LoopCount, r0bPickHeadColor, r0bPickHandle: Integer;
Var FoundHead, BreakLoop, Dropped: Boolean;


Spky

2007-08-16 15:54:08

You forgot the parameters type :rolleyes:

R0b0t1

2007-08-16 16:12:37

Ohhh….


Thanks.

~alex~

2007-08-20 08:53:41

you put an extra semi colon after r0bpickcolor :P