SRL Archive - First Scripts

mikes wc


leeds4eva

2013-09-22 07:24:36

so i decided to make first script, a simple woodcutter. I was looking at few videos on how to script ect.when i came across a written guide which i found easier. i followed everything it says.but i get this error i canot work it out#:any help would be great.

list of errors:

[Error] C:\Simba\Includes\SRL/SRL/misc/SmartParams.Simba(282:145): Type mismatch at line 281
Compiling failed.

[Error] C:\Simba\Includes\SRL/SRL/misc/SmartParams.Simba(281:149): Invalid number of parameters at line 280
Compiling failed.


program mikeswc;
{$DEFINE SMART8}
{$i srl/srl.simba}

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;
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');
end;
end;
end;

procedure ChopTree;
var x, y: integer;
begin
repeat
if FindObj(x, y, 'hop', 1785912, 35) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('hop');
end;
repeat
wait(400+random(250));
AntiBan;
Until not IsUpText('ew') or (InvFull);
until(InvFull);
end;

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

Ian

2013-09-22 07:45:18

Hi Mike,

That error isn't because of your script really, it's because your SmartParams don't match the version of SMART that you have/have defined.

First try changing

{$DEFINE SMART8}
to

{$DEFINE SMART}

If you still get an error, try upgrading your SMART to 8.2 and trying again. If you still get the error, try changing back to

{$DEFINE SMART8}

If all this doesn't work, you'll have to go into the SmartParams.simba file and change one of the lines slightly. (probably adding another parameter).

You can also wait for SRL6 instead, it should be released very soon and will work with SMART 8.3 which has already been released :)

Itankbots

2013-09-23 20:24:15

If you're coding for RS3. I would wait for SRL6. which is gonna be released in a beta verison very soon. Most the code you're using is outdated in SRL5 for rs3 :/

Also, next time, put Tags around your script, makes it easier to read/takes up less space :)

Glad to see you interested in scripting tho :D

leeds4eva

2013-09-25 04:28:38

tried everything u suggested no luck. lol and is rsoschool lol.

EngageTheRage

2013-09-25 08:44:51

From: leeds4eva
tried everything u suggested no luck. lol and is rsoschool lol.


if its for oldschool you will want to use:
{$i SRL-OSR/Srl.simba}

instead of:
{$i srl/srl.simba}

on the 3rd line :D