SRL Archive - OSR Help

Script not compiling [Help Please]


EZ41

2013-11-24 12:02:30

I patched a couple of scripts together to try and see if I was capable of making something, unfortunately it won't compile due to '[Error] (78:3): comma (',') expected at line 78 Compiling failed.'

Could someone please tell me what I'm doing wrong, line 84 is red.


program New;
{$DEFINE SMART}
{$i srl/srl.simba}

var x, y, tinderbox, oaklog, willowlog, maplelog :Integer;

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;

procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(8) of
0:
begin
HoverSkill('Woodcutting', false);
wait(2453+Random(432));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(100+random(133));
MakeCompass('S');
wait(50+random(133));
MakeCompass('N');
FindNormalRandoms;
end;
end;
end;

Procedure InitialiseVariables;
begin
maplelog := DTMFromString('mWAAAAHicY2FgYMhjYmBIBuIqIE4HYn1GBgYVIDYGYksgznDjAKpiRMKogBGLLADcjAM/');
tinderbox := DTMFromString('mWAAAAHicY2FgYPjJxMDAzMzA8B5I/wViN0YGBisgtgFiHyBeOmsmUBUjEkYFjFhkAYTEBeE=');
willowlog := DTMFromString('mWAAAAHicY2FgYChhZmCoB+J8IG4DYjtGBgZjIHYHYlcgjvBXAKpiRMKogBGLLAAAQgPI');
oaklog := DTMFromString('mFQEAAHic42VgYJjAxMAwD4iXAPECIJ4GxN1A3A7lLwXiPiCeDcRToXKijAwMgkDMB8T/gWYwAGkWIOaG0pyMELG/QEoYqhYsQDImHVBsCwCL+Qpl');
end;

procedure ChopTree;
var x, y: integer;
begin
repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 4881311, 20)
then //set color and tolerance of tree
begin
MMouse(RandomRange(X - 5, X + 5), RandomRange(y - 7, y + 5), 0, 0);
ChooseOption('hop');
end;
repeat
wait(400+random(700));
AntiBan;
Until not IsUpText('ak') or (InvFull); //name of tree: maple 'aple'
until(InvFull);
end;

procedure Burn;
begin
While (FindDTM(oaklog,x,y,MIX1,MIY1,MIX2,MIY2) = True) do
begin
FindDTM(tinderbox,x,y,MIX1,MIY1,MIX2,MIY2);
MMouse(x, y,randomrange(-6,3),randomrange(-6,3));
ClickMouse2(mouse_left);
wait(randomrange(20,100)
FindDTM(oaklog,x,y,MIX1,MIY1,MIX2,MIY2);
MMouse(x,y,randomrange(-3,3),randomrange(-3,3);//line 84
end;
end;



begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
ChopTree;
Burn;
end.

Sjoe

2013-11-24 12:17:30

MMouse(x,y,randomrange(-3,3),randomrange(-3,3));//line 84

EZ41

2013-11-24 12:41:35

isn't that what I wrote? I don't understand sorry

Kyle

2013-11-24 12:47:51

Notice the parentheses :) Gotta make sure you have the same amount on each side or it will keep expecting more parameters.

EZ41

2013-11-25 17:02:07

ah I missed that, however even with both parenthesis it gives me the error.

"[Error] C:\Simba\Scripts\myscript.simba(78:3): comma (',') expected at line 78
Compiling failed."

Thanks but it seems like it still isn't working :(

Kyle

2013-11-29 19:02:19

Your Line 76 had the same problem, it was missing a parentheses. It compiles fine now. :)

procedure Burn;
begin
While (FindDTM(oaklog,x,y,MIX1,MIY1,MIX2,MIY2) = True) do
begin
FindDTM(tinderbox,x,y,MIX1,MIY1,MIX2,MIY2);
MMouse(x, y,randomrange(-6,3),randomrange(-6,3));
ClickMouse2(mouse_left);
wait(randomrange(20,100))
FindDTM(oaklog,x,y,MIX1,MIY1,MIX2,MIY2);
MMouse(x,y,randomrange(-3,3),randomrange(-3,3));
end;
end;