SRL Archive - OSR Help

Compiling error


Troll

2011-06-20 12:42:45

So i have started to get back into scripting, i get

[Error] (29:47): Variable Expected at line 28
Compiling failed.

and the code is

Function FindMossGiant:Boolean;
Var x,y,i:Integer;
Click:TPoint;
SingleArray:TPointArray;
MutiArray:TPointArrayArray;
Begin

If Not LoggedIn Then Exit;
If InFight Then Exit;
//If Not InRightPlace Then Exit;

SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.10,0.16);

If FindColorsSpiralTolerance(x,y,TpointArray,2375488,MSX1,MSY1,MSX2,MSY2,6) Then
Begin

If ( High(SingleArray) < 1 ) Then Exit;
MutiArray := TPAtoATPAEx(TPA,5,5);

For i := High(MutiArray) downto 0 Do
Begin
Click := MiddleTPA(MutiArray[i]);
MMouse(click.x,click.y,RandomRange(-4,4),RandomRange(-4,4));
GetMousePos(x,y);

If WaitUpText('Moss',5000) Then
If (Random(20) = 5) Then
Begin
Mouse(x,y,0,0,False);
If WaitOption('Attack',5000) Then
Begin
Result := True;
Exit;
End;
End else Begin
Mouse(x,y,0,0,true);
Result := true;
End;
Else writeln('Could not find uptext');
End;

End else writeln('colour dont found');

SetColorToleranceSpeed(1);

End;

Line 28 is the findcolorssprial one.

Thanks for any help :)

masterBB

2011-06-20 12:48:57

TPointArray is a type, use SingleArray instead.

Troll

2011-06-20 12:59:22

From: masterBB
TPointArray is a type, use SingleArray instead.


Oh dam thanks i didnt see that :)

I just wrote it out without using the vars and then changed them later.

Thanks again :)

masterBB

2011-06-20 13:05:27

From: Troll
Oh dam thanks i didnt see that :)

I just wrote it out without using the vars and then changed them later.

Thanks again :)


No problem ;)