SRL Archive - OSR Help

'BEGIN' expected at line **


Wizzer Gizzer

2012-02-09 20:24:29

i was writing an antiban script for a port sarim willow cutter and it gave me this error

[Error] (46:1): 'BEGIN' expected at line 45
Compiling failed.

procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(12) of
0:
begin
wait (random(1000))
end;
2:
begin
MakeCompass('N');
wait(100+random(133));
end;
3:
begin
wait (343+random(1222));
end;
2:PickUpMouse;
7:
begin;
HoverSkill('Woodcutting', false);
wait(1000+Random(1000));
end;
12:
MakeCompass('S')
end;
end;
end;


also, if anybody could help explain this part of the walking ddtm tutorial to me id really appreciate it.

If you have more DDTM's, under the first end; put 2: begin then your DDTM again.

Now you have your DDTM calling ready time for finding!

Go to your walking procedure. Add these:
SCAR Code:

function WalkToSomewhere: Boolean;
var
WalkDTM: integer; // Calls the WalkDTM making walking simpler.
begin
WalkDTM := LoadAllDTMWalks(1); //Load which DDTM you want to find.
if FindDTM(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2) then // Find the DDTM using Find DTM
begin
Mouse(X, Y, 8, 8, True);
WriteLn('Walk Main 1. - Complete.');
FFlag(0);
Result := True; // If succesfully finds it will click it and wait to flag is gone.
end else // else it will do this…
if RadialWalk(FindFallyRoadColor, 300, 220, 55, 1, 1) then
begin
Writeln(' Walk Backup 1. - Complete.');
Result := True; //Will look for this if DDTM fails, if this fails then logsout, but you can change that.
end else
begin
Result := False;// cant find the backup goes here…
Writeln(' Walk Backup 1. - Failed. Logging Out.');
FreeDTM(WalkDTM); // FREEs the DDTM so you dont have a memory overload :P
if not (Result) then //if doesnt get results does this
begin
Logout; // logs out.
end;
end;
end;



source :http://villavu.com/forum/showthread.php?t=32608

Kyle Undefined

2012-02-09 20:27:04

12:
begin
MakeCompass('S')
end;

That should do it :)

Wizzer Gizzer

2012-02-09 20:31:49

From: Kyle Undefined
12:
begin
MakeCompass('S')
end;

That should do it :)



lol Thank you so much.

i also had 1 too many end; 's