PDA

View Full Version : Little Help?



Hey321
12-16-2006, 01:35 AM
function Duel: Boolean;
begin
If (findcolorTolerance(x, y, 12926 , MCX1, MCY1, MCX2, MCY2, 25)) Then
Begin
MMouse(x, y, 3, 3);
Mouse(x,y,3,3, True);
Result := True
End;
else//<---- That's line 17
Begin
WriteLn('OMFG It''s False');
Result := False;
End;
End;

Whats wrong with that?

Giving me this:

Line 17: [Error] (15515:1): Identifier expected in script C:\Program Files\SCAR 2.03\Scripts\Duler.scar

Dankness
12-16-2006, 01:52 AM
function Duel: Boolean;
begin
if ( FindColorTolerance ( x, y, 12926 , MCX1, MCY1, MCX2, MCY2, 25 )) Then
begin
MMouse(x, y, 3, 3);
Mouse(x,y,3,3, True);
Result := True
end //<------ No Semicolon ( one of these ; ) in here
else //<---- nothing wrong here but the line above is added to this line at compile time
begin
WriteLn('OMFG It''s False');
Result := False;
End;
End;


no Semicolin in a if then else statement

Hey321
12-16-2006, 02:02 AM
Ah, thanks Dank, time to go test the script :).

Edit: Sometimes the script says its true, but still tries to open duel screen and keeps on talking :(.