[Error] (261:4): period ('.') expected in script

06/13/2014 15:10 delemojo#1
Writing a bot atm keep getting this ERROR([Error] (261:4): period ('.') expected in script ) guess it is caused by these lines:
"

procedure findhealthbar(var hx,hy:Integer);
begin
MoveMouse(hx,hy); //<-- Change Coords to your Healthbar position.
wait(100+random(10));
end;


procedure healthbarcheck1(var hx,hy:Integer);
begin
if (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

wait(100+random(10));
MoveMouse(rx,ry); //<-- Change Coords to Repairbutton position.
HoldMouse(rx,ry,true); //<-- Change Coords to Repairbutton position.

end;
end;

procedure healthbarcheck2(var hx,hy:Integer);

begin
MoveMouse(hx,hy);
wait(100+random(10));
end;


begin

if (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

ReleaseMouse(rx,ry,true);

end;
end;

begin

MoveMouse(hx,hy);


begin

If (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;


HoldMouse(rx,ry,true); //<-- Change Coords to Repairbutton position.
end;
end;

begin

If (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

ReleaseMouse(rx,ry,true);
end;

end;

"
If someone could help a little bit? :D btw. My first try to write something like that before I just programmed a little bit in PASCAL.

~me :P
06/13/2014 15:37 mechanikzsz#2
Quote:
Originally Posted by delemojo View Post
Writing a bot atm keep getting this ERROR([Error] (261:4): period ('.') expected in script ) guess it is caused by these lines:
"

procedure findhealthbar(var hx,hy:Integer);
begin
MoveMouse(hx,hy); //<-- Change Coords to your Healthbar position.
wait(100+random(10));
end;


procedure healthbarcheck1(var hx,hy:Integer);
begin
if (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

wait(100+random(10));
MoveMouse(rx,ry); //<-- Change Coords to Repairbutton position.
HoldMouse(rx,ry,true); //<-- Change Coords to Repairbutton position.

end;
end;

procedure healthbarcheck2(var hx,hy:Integer);

begin
MoveMouse(hx,hy);
wait(100+random(10));
end;


begin

if (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

ReleaseMouse(rx,ry,true);

end;
end;

begin

MoveMouse(hx,hy);


begin

If (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;


HoldMouse(rx,ry,true); //<-- Change Coords to Repairbutton position.
end;
end;

begin

If (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

ReleaseMouse(rx,ry,true);
end;

end;

"
If someone could help a little bit? :D btw. My first try to write something like that before I just programmed a little bit in PASCAL.

~me :P

remove "//<-- Change Coords to Repairbutton position." and try :)
06/13/2014 15:42 delemojo#3
hmm still not working tried to re- arange things:
"

procedure findhealthbar(var hx,hy:Integer);
begin
MoveMouse(hx,hy);
wait(100+random(10));
end;


procedure healthbarcheck1(var hx,hy:Integer);
begin
if (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

wait(100+random(10));
MoveMouse(rx,ry);
HoldMouse(rx,ry,true);

end;
end;

procedure healthbarcheck2(var hx,hy:Integer);

begin
MoveMouse(hx,hy);
wait(100+random(10));

if (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

MoveMouse(rx,ry);
ReleaseMouse(rx,ry,true);

end;
end;

begin

MoveMouse(hx,hy);

end;

begin

If (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

HoldMouse(rx,ry,true);
else
MoveMouse(rx,ry);
RealeaseMouse(rx,ry,true);

or
begin
MoveMouse(hx,hy);
If (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;
MoveMouse(rx,ry);
ReleaseMouse(rx,ry,true);
end;

end;
06/13/2014 15:59 g_Sho#4
hmm still not working tried to re- arange things:
"

procedure findhealthbar(var hx,hy:Integer);
begin
MoveMouse(hx,hy);
wait(100+random(10));
end;


procedure healthbarcheck1(var hx,hy:Integer);
begin
if (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;<----- no ; after begin

wait(100+random(10));
MoveMouse(rx,ry);
HoldMouse(rx,ry,true);

end;
end;

procedure healthbarcheck2(var hx,hy:Integer);

begin
MoveMouse(hx,hy);
wait(100+random(10));

if (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

MoveMouse(rx,ry);
ReleaseMouse(rx,ry,true);

end;
end;

begin

MoveMouse(hx,hy);

end;

begin

If (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

HoldMouse(rx,ry,true);
else
MoveMouse(rx,ry);
RealeaseMouse(rx,ry,true);

or
begin
MoveMouse(hx,hy);
If (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;
MoveMouse(rx,ry);
ReleaseMouse(rx,ry,true);
end;

end;


and btw if you could tell : Which of all thos lines is line 261 it would be way easier....
06/13/2014 16:10 delemojo#5
Line 264: [Error] (264:4): period ('.') expected in script
[Only registered and activated users can see links. Click Here To Register...]
btw. edited the <---no thing allready not on screenshot...
06/13/2014 16:23 g_Sho#6
hmm still not working tried to re- arange things:
"

procedure findhealthbar(var hx,hy:Integer);
begin
MoveMouse(hx,hy);
wait(100+random(10));
end;


procedure healthbarcheck1(var hx,hy:Integer);
begin
if (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin

wait(100+random(10));
MoveMouse(rx,ry);
HoldMouse(rx,ry,true);

end;
end;

procedure healthbarcheck2(var hx,hy:Integer);
begin
MoveMouse(hx,hy);
wait(100+random(10));

if (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin

MoveMouse(rx,ry);
ReleaseMouse(rx,ry,true);

end;

MoveMouse(hx,hy);
If (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then HoldMouse(rx,ry,true);
else begin
MoveMouse(rx,ry);
RealeaseMouse(rx,ry,true); end;

or //what do u want with this
MoveMouse(hx,hy);
If (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin
MoveMouse(rx,ry);
ReleaseMouse(rx,ry,true);
end;

end;


changed a few thing but what do u want to do with this "or"
06/13/2014 16:25 delemojo#7
Quote:
Originally Posted by g_Sho View Post
hmm still not working tried to re- arange things:
"

procedure findhealthbar(var hx,hy:Integer);
begin
MoveMouse(hx,hy);
wait(100+random(10));
end;


procedure healthbarcheck1(var hx,hy:Integer);
begin
if (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin

wait(100+random(10));
MoveMouse(rx,ry);
HoldMouse(rx,ry,true);

end;
end;

procedure healthbarcheck2(var hx,hy:Integer);
begin
MoveMouse(hx,hy);
wait(100+random(10));

if (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin

MoveMouse(rx,ry);
ReleaseMouse(rx,ry,true);

end;

MoveMouse(hx,hy);
If (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then HoldMouse(rx,ry,true);
else begin
MoveMouse(rx,ry);
RealeaseMouse(rx,ry,true); end;

or //what do u want with this
MoveMouse(hx,hy);
If (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin
MoveMouse(rx,ry);
ReleaseMouse(rx,ry,true);
end;

end;


changed a few thing but what do u want to do with this "or"
Allready an 'else' idk I just tested
06/13/2014 16:27 g_Sho#8
Quote:
Originally Posted by delemojo View Post
Allready an 'else' idk I just tested
you mean else if ?
06/13/2014 16:30 delemojo#9
Quote:
Originally Posted by g_Sho View Post
you mean else if ?
put it out completly:
begin

If (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

HoldMouse(rx,ry,true);
else
MoveMouse(rx,ry);
RealeaseMouse(rx,ry,true);
end;
begin
MoveMouse(hx,hy);
If (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;
MoveMouse(rx,ry);
ReleaseMouse(rx,ry,true);
end;
06/13/2014 16:31 g_Sho#10
Quote:
Originally Posted by delemojo View Post
put it out completly:
begin

If (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;

HoldMouse(rx,ry,true);
else
MoveMouse(rx,ry);
RealeaseMouse(rx,ry,true);
end;
begin
MoveMouse(hx,hy);
If (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin;
MoveMouse(rx,ry);
ReleaseMouse(rx,ry,true);
end;
begin
If (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then HoldMouse(rx,ry,true);
else
MoveMouse(rx,ry);
RealeaseMouse(rx,ry,true);
end;
begin
MoveMouse(hx,hy);
If (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin
MoveMouse(rx,ry);
ReleaseMouse(rx,ry,true);
end;

its "begin" not "begin;"
06/13/2014 16:35 delemojo#11
Quote:
Originally Posted by g_Sho View Post
begin
If (Findcolortolerance(hx,hy,2568420 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then HoldMouse(rx,ry,true);
else
MoveMouse(rx,ry);
RealeaseMouse(rx,ry,true);
end;
begin
MoveMouse(hx,hy);
If (Findcolortolerance(hx,hy,29440 ,mmx1, mmy1, mmx2, mmy2, 30)=true)then begin
MoveMouse(rx,ry);
ReleaseMouse(rx,ry,true);
end;

its "begin" not "begin;"
found it like this in another script but I changed it :)