SRL Archive - Help

Problems with script


Syntax

2012-05-29 20:57:53

Hi guys I'm having a few troubles with my iron miner that I can't figure out what is wrong with it. The error in the debug box is:
[Error] (84:4): Identifier expected at line 83
Compiling failed.

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

const
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 35; // Enter "0" to pick a random server.
MEMBERS = True;
Version ='1.1';


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('Mining', false);
wait(2453+Random(432));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(100+random(133));
MakeCompass('W');
wait(50+random(133));
MakeCompass('N');
FindNormalRandoms;
end;
end;
end;

Procedure MineOre;
var x, y, : integer;
begin;
{if not FindNormalRandoms then
if not LoggedIn then
TerminateScript};
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
wait(200+random(400))
begin
if FindObjCustom(x, y, ['Mine', 'ine'], [2832994, 3294323 , 2701150, 3029075], 25) then
GetMousePos(x, y);
case random(2) of
0: Mouse(x, y, 5, 5, True);
1: begin
Mouse(x, y, 5, 5, False);
WaitOption('Mine', 500);
end;
end;

begin
Smart_Signed := TRUE;
Smart_Members := MEMBERS;
Smart_SuperDetail := FALSE;
Smart_Server := 35;
ActivateClient;
SetUpSRL;
DeclarePlayers;
LoginPlayer;
wait(4000+random(400));
repeat
MineOre;
Antiban;
until(false)
end.



Thank you.

YoHoJo

2012-05-29 21:02:17

Seems like a developer made a commit that didn't compile as far as I can see.
Gotta wait a while and SRL should be fixed/updated.

Runaway

2012-05-29 21:03:10


Procedure MineOre;
var x, y, : integer; // remove the , after the y!
begin; // remove the ;!
{if not FindNormalRandoms then
if not LoggedIn then
TerminateScript}; // another unecessary ;!
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
wait(200+random(400)) // need a ; here!

EDIT: also


Procedure MineOre;
var x, y, : integer;
begin;
{if not FindNormalRandoms then
if not LoggedIn then
TerminateScript};
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
wait(200+random(400))
begin
if FindObjCustom(x, y, ['Mine', 'ine'], [2832994, 3294323 , 2701150, 3029075], 25) then
GetMousePos(x, y);
case random(2) of
0: Mouse(x, y, 5, 5, True);
1: begin
Mouse(x, y, 5, 5, False);
WaitOption('Mine', 500);
end;
end;

lots of begins and only 2 ends! I think it's carrying over to the end (line 84) since there's no actual end it recognizes.

@YoHo, I don't understand, where does randomtool.simba come into this? 0.0

YoHoJo

2012-05-29 21:04:07

^ And yeah, lots of little problems in the script.
(But would those cause an error in RandomTool.simba too??? what's going on?!)

Syntax

2012-05-29 21:08:17

From: YoHoJo
^ And yeah, lots of little problems in the script.
(But would those cause an error in RandomTool.simba too??? what's going on?!)


Its my first script

YoHoJo

2012-05-29 21:10:53

^ I don cer u r stupid!

I know :], didn't mean to make you feel bad or anything.
Anyways here it is with proper/better standards (spacing done right), and fixed all the small errors, it now compiles and works fine.

Very odd how it was not giving a compile error and an error with SRL… hmm

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

const
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 35; // Enter "0" to pick a random server.
MEMBERS = True;
Version ='1.1';


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('Mining', false);
wait(2453+Random(432));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(100+random(133));
MakeCompass('W');
wait(50+random(133));
MakeCompass('N');
FindNormalRandoms;
end;

end;
end;

Procedure MineOre;
var x, y : integer;
begin
{if not FindNormalRandoms then
if not LoggedIn then
TerminateScript};
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
wait(200+random(400))
begin
if FindObjCustom(x, y, ['Mine', 'ine'], [2832994, 3294323 , 2701150, 3029075], 25) then
GetMousePos(x, y);

case random(2) of
0: Mouse(x, y, 5, 5, True);
1: begin
Mouse(x, y, 5, 5, False);
WaitOption('Mine', 500);
end;
end;
end;
end;

begin
Smart_Signed := TRUE;
Smart_Members := MEMBERS;
Smart_SuperDetail := FALSE;
Smart_Server := 35;
ActivateClient;
SetUpSRL;
DeclarePlayers;
LoginPlayer;
wait(4000+random(400));
repeat
MineOre;
Antiban;
until(false)
end.

Syntax

2012-05-29 21:14:21

From: YoHoJo
^ I don cer u r stupid!

I know :], didn't mean to make you feel bad or anything.
Anyways here it is with proper/better standards (spacing done right), and fixed all the small errors, it now compiles and works fine.

Very odd how it was not giving a compile error and an error with SRL… hmm

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

const
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 35; // Enter "0" to pick a random server.
MEMBERS = True;
Version ='1.1';


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('Mining', false);
wait(2453+Random(432));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(100+random(133));
MakeCompass('W');
wait(50+random(133));
MakeCompass('N');
FindNormalRandoms;
end;

end;
end;

Procedure MineOre;
var x, y : integer;
begin
{if not FindNormalRandoms then
if not LoggedIn then
TerminateScript};
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
wait(200+random(400))
begin
if FindObjCustom(x, y, ['Mine', 'ine'], [2832994, 3294323 , 2701150, 3029075], 25) then
GetMousePos(x, y);

case random(2) of
0: Mouse(x, y, 5, 5, True);
1: begin
Mouse(x, y, 5, 5, False);
WaitOption('Mine', 500);
end;
end;
end;
end;

begin
Smart_Signed := TRUE;
Smart_Members := MEMBERS;
Smart_SuperDetail := FALSE;
Smart_Server := 35;
ActivateClient;
SetUpSRL;
DeclarePlayers;
LoginPlayer;
wait(4000+random(400));
repeat
MineOre;
Antiban;
until(false)
end.


Ok thanks mate :)