SRL Archive - OSR Help

Syntax error


cradlefatal

2013-02-25 19:37:12

while working on my mining bot I came across a Syntax error [Error] C:\Simba\Scripts\newminer.simba(106:23): Syntax error at line 105
Compiling failed.

I haven't came across this error yet or anything about it in the forums this is what I have written so far


program new;
{$DEFINE SMART8}
{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I SRL/SRL/Misc/SmartGraphics.Simba}





Const

//Credits to YoHoJo for an understandable tutorial video, and Solidone4 for the antiban
SRLStats_Username = '';// Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
LoadsTotal = 9999; //
PaintEvery = 5; //Update leve paint every this many seconds
Version = '1.00'; //

procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;
for i := 0 to 1-1 do
Players[i].BoxRewards := ['Mining'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Active := True;
Integers[1] := 4; //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
Integers[2] := 4; //Seconds to try mining rock before clicking another.
End;
End;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;



Function CheckAndClick(UpText:String; X,Y:Integer; RClick:String):Boolean;
Begin
MMouse(x, y, 5, 5);
If WaitUptext(UpText, 5) Then
Begin
Result:=True;
GetMousePos(x, y);
End;
End;


Procedure Antiban;
Begin
Case Random(20000) Of

0:
Begin
HoverSkill('Mining', False);
GameTab(Tab_Inv);
End;
1:
Begin
PickUpMouse;
SleepAndMoveMouse(3000 + Random(500));
PickUpMouse;
End;
2: ExamineInv;
3:
Begin
RandomAngle(SRL_ANGLE_HIGH);
SetAngle(SRL_ANGLE_HIGH);
End;
4:
Begin
GameTab(Tab_Stats);
Wait(3000 + Random(500));
GameTab(Tab_Inv);
End;
5:
Begin
HoverSkill('random', False);
GameTab(Tab_Inv);
End;

End;
End;

Procedure FailSafe(Reason:String);
Begin
Players [CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;

Function MineIt:Boolean;
Var
x,y: Integer;
Begin
If FindObjCustom(x, y,; ['Mine', 'Coal', 'rocks', 'e l s'], [2039840,7437940,2961199,2763820,789773,2237219,1776925,2039840,2040354,1250324,1052945,3027506,2039840], 15);
Begin
StatsGuise('We Found The Rock');

GetMousePos (x,y);
Case Random(1) of
0: Mouse (x,y);
1: WaitOption ('Mine', 200);
end;
end;
end;

Begin
SetupSRL;
DeclarePlayers'
//Repeat;
//Until(False);
End;

thank you guys for helping me get this far

Sjoe

2013-02-25 19:46:06

Wow, how many colors do u need lol I dont think that's gonna work properly.
Try and use ACA. http://villavu.com/forum/showthread.php?t=71074


If FindObjCustom(x, y,; ['Mine', 'Coal', 'rocks', 'e l s'], [2039840], 15);

// should be:

If FindObjCustom(x, y, ['Mine', 'Coal', 'rocks', 'e l s'], [2039840], 15) then // no ; before then
begin


Case Random(2) of //Case random of 2 , there are 2 NOT 1 like u did.
0: Mouse (x,y, 1, 1, mouse_left); // wrong parameters.
1: begin 0: Mouse (x,y, 1, 1, mouse_right ); WaitOption ('Mine', 800); end; // This is what u want I think
end;



Begin
SetupSRL;
DeclarePlayers; // typo with the '
//Repeat;
//Until(False);
End. // main loop end is not end; but end. with a dot

I suggest reading/watching some tutorials first, since they cover all the basic mistakes your making atm.

Try these out:
http://villavu.com/forum/showthread.php?t=67691
http://villavu.com/forum/showthread.php?t=69179

and of course the most important one http://villavu.com/forum/showthread.php?t=58935 !!!!

EDIT:
this is for 07 I guess: so u need this include:
http://villavu.com/forum/showthread.php?t=96863 (read it thoroughly before posting errors)

Ian

2013-02-25 19:46:47

It's hard for me to tell the line number from my phone but I think the problem is here::
If FindObjCustom(x, y,; ['Mine', 'Coal', 'rocks', 'e l s'],

You need to take out the semicolon after the comma I think :)

cradlefatal

2013-02-25 20:04:48

Awesome Thank you for the help i've spent all day trying to get this stupid thing working lols