SRL Archive - Help

Can somebody help me with my script? :)


jkrules22

2012-03-22 20:16:56

Ok so I've been trying to learn to script from YoHoJo's tutorials, Im getting a [Error] (99:27): Type mismatch at line 98, Im not sure what to do to fix this. If somebody would lend me a hand I would highly appreciate it. Heres what my script looks like:( I underlined the line it says the error is in.)


Program PowerChopper;


//{$DEFINE SMART}
{$i SRL\SRL.simba}




Const
SRLSTATS_USERNAME = ''; // SRL Stats Username.
SRLSTATS_PASSWORD = ''; // SRL Stats Password.
BreakEvery= 120; // How many minutes to break after.
BreakFor= '5'; // How long to break for.
NumbOfPlayers= 1; // How many players are you using?
StartPlayer= 0; // Player to start autoing with.
Version= '1.0'; // NO TOUCHY!

procedure DeclarePlayers;
begin;
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin;
Name := ''; // Player Username
Pass := ''; // Player Password
Pin := ''; //Pin for bank
Active := true;
end;
end;


Procedure StatsGuise(wat:String);
Begin;
Status(wat);
Disguise(wat);
End;


Procedure Antiban;
Begin;
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Woodcutting', False) GameTab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
End;
End;

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

Function ChopDown:Boolean;
Var
x, y, PlusOne, TreeCounter:Integer;
Begin
PlusOne:= InvCount + 1;
//FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 2;
x:=MSCY;
y:=MSCY;
If FindObjTPA(x, y, 2965842, 10, 1, 15, 60, 600, ['Chop']) Then
Begin;
WriteLn('FK yea Ive found a tree, ima cut yu down!');
GetMousePos(x, y);
Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;
end;
end;

Procedure DropLogs;
var
x, y, I, LogDTM:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;

Begin;

LogDTM := DTMFromString('mlwAAAHicY2dgYMhlYmBIAOI4IC4G4iogLg PiHCDWZWRg0ARiUyg2BmIlIFYGYm8LRaBuJhwYN2DEg6EAAGDp BQY=');
LogPattern:=[1,5,9,13,17,21,2,6,10,14,18,22,3,7,11,15,19,23,4,8,12,16,20,24];


For I:=0 To 27 Do
Begin;
SlotBox:=InvBox(LogPattern(I));
If FindDTm(OreMid, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2)
FindDTM() Then
Begin;
MouseItem(LogPattern(I),False);
ChooseOption('Dro');
End;
End;


Flag;


Repeat;
MarkTime(TreeCounter);
Antiban;
Wait(1000);
If InvCount=PlusOne Then;
Writeln('Muwahahaha!');
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000);
End;

End;














begin
ActivateClient;
SetupSRL;
DeclarePlayers;
Repeat;
ChopDown;
Until(False);
DropLogs;
end.

ReadySteadyGo

2012-03-22 20:23:49


for I := 0 to 27 do
begin
SlotBox := InvBox(LogPattern(I));
if FindDTM(OreMid, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) then
begin
MouseItem(LogPattern(I), False);
ChooseOption('Dro');
end;
end;

remove the ';' from begin

and the if FindDTM()

please read up on coding standards.

NKN

2012-03-22 21:33:41

Your problem is your ; after Begin.
To make your code easier to read, use Tab, and follow the above posts link.

jkrules22

2012-03-23 00:07:21

Taking the ; off of begin didnt fix it :(

lilcmp1

2012-03-23 00:10:41

It would help if you told us which line is 98. Also always add
 before code and 
after.

Without spaces of course

ReadySteadyGo

2012-03-23 11:58:51

From: jkrules22
Taking the ; off of begin didnt fix it :(


did you even read what I posted?

jkrules22

2012-03-27 18:46:53

From: lilcmp1
It would help if you told us which line is 98. Also always add
 before code and 
after.

Without spaces of course


I did say which line is 98 :)

jkrules22

2012-03-27 18:49:05

From: ReadySteadyGo
did you even read what I posted?


I did…

LordJashin

2012-03-27 18:58:44

From: jkrules22
I did…
Remember that when you post something that has simba or scar code in it, and then you hit the edit button. It will all be screwed up, and you will have to copy and paste the code again.

Nexz

2012-03-27 19:27:35

From: ReadySteadyGo

please read up on coding standards.

+
http://villavu.com/forum/showthread.php?t=58935

jkrules22

2012-03-28 12:49:36

Ok Ive figured it out, Sorry I should have read up before posting this.





Ty all for the help :)