SRL Archive - OSR Help

SPS_Setup(): ERROR: SPS areas are not set! why?


Here2help

2012-05-22 00:19:48

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


var
Mypath : TPointArray;
myAreas : TStringArray;
procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;

With Players[0] do
begin
Name := ''; //Username
Pass := ''; //Password
Pin := ''; //Bank Pin
Active := True;
end;
end;

Procedure OpeningAndWithdrawing;
begin
OpenBank('ctb', False, False);
If BankScreen Then
Withdraw(0,0,27);
end;
procedure walk2cook;
begin
myPath := [Point(3077, 2884), Point(3077, 2884), Point(3097, 2878), Point(3074, 2885), Point(3074, 2885)];
sps_walkpath(mypath)
end;
procedure clickthisitem;
begin
mouseitem(1, 0);
end;
function ClickRange: Boolean;
var
MyTPA : TPointArray;
MyPoint : TPoint;
x, y, i : Integer;
begin
FindColorsTolerance(MyTPA, 2830733, MSx1, MSy1, MSx2, MSy2, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 3, 3);
if (IsUpTextMultiCustom(['ange', 'Range'])) then
begin
GetMousePos(x, y);
Mouse(x, y, 4, 4, mouse_Left);
Wait(500+random(250));
Exit;
end;
end;
end;
procedure walk2bank;
begin
inverttpa(mypath);
sps_walkpath(mypath);
end;
begin
Smart_Server := 64
Smart_Members := True;
Smart_Signed := True;

SetupSRL;
mousebox(226, 402, 292, 456, mouse_left);
SPS_Areas := ['7_7'];
SPS_Setup(RUNESCAPE_SURFACE, myAreas);
end.



Why am i getting
SPS_Setup(): ERROR: SPS areas are not set!
?

iBlank

2012-05-22 00:22:14

Is myAreas the name of just one .png?

If it is a folder you need to call each individual image to have them setup.

Spiker

2012-05-22 00:24:05

 SPS_Setup(RUNESCAPE_SURFACE, myAreas);

What's this all about? What is myAreas?

i luffs yeww

2012-05-22 00:25:45

You're initializing the "myAreas" TStringArray, but you never assign anything to it.

I've never touched SPS, so I don't know what it should be, but that seems like it'd be an issue.

Here2help

2012-05-22 00:28:54

I think, iirc, I tried to make my area a certain part of the map using an SPS tool.

iBlank

2012-05-22 00:33:17

If I understand what you are trying to do, then instead of this:

SPS_Areas := ['7_7'];
SPS_Setup(RUNESCAPE_SURFACE, myAreas);

you need this:

SPS_Areas := ['7_7'];
SPS_Setup(RUNESCAPE_SURFACE, SPS_Areas);

but you could really just do this:

SPS_Setup(RUNESCAPE_SURFACE, ['7_7']);

That is assuming I am understanding what you are trying to setup with SPS.

Here2help

2012-05-22 00:37:45

From: alevere4
If I understand what you are trying to do, then instead of this:

SPS_Areas := ['7_7'];
SPS_Setup(RUNESCAPE_SURFACE, myAreas);

you need this:

SPS_Areas := ['7_7'];
SPS_Setup(RUNESCAPE_SURFACE, SPS_Areas);

but you could really just do this:

SPS_Setup(RUNESCAPE_SURFACE, ['7_7']);

That is assuming I am understanding what you are trying to setup with SPS.


Yeah i figured it was the last one right as you posted. I also took it out at the top.