SRL Archive - OSR Help

What is wrong with this script?


duke4eva

2013-03-03 16:58:55

I have no idea what i did wrong, i just want a simple script that will drop my logs after a full inventory..

program Drop;
{$i srl/srl.simba}
{$I P07Include.Simba}



begin




procedure Drop;
begin
if (P07_InvFull) then
begin
P07_DropAllExcept([1]);
end;
end;
end.



Says identifier expected at the "Procedure" line

Sjoe

2013-03-03 17:04:35


program Drop;
{$i srl/srl.simba}
{$I P07Include.Simba}

begin
SetUpP07Include;
ActivateClient;

if (P07_InvFull) then P07_DropAllExcept([1]);

end.

DannyRS

2013-03-03 17:06:11

program Drop;
{$i srl/srl.simba}
{$I P07Include.Simba}

procedure Drop;
begin
if (P07_InvFull) then
P07_DropAllExcept([1]);
end;

begin
SetUpP07Include;
ActivateClient;
Drop;
end.

procedures must go before program's begin end.

duke4eva

2013-03-03 17:07:25

Thank you, although i would like to learn why i did not have to make a procedure, and does activateclient always have to be in the code to recognize the client you select?

Sjoe

2013-03-03 17:07:35

From: DannyRS
program Drop;
{$i srl/srl.simba}
{$I P07Include.Simba}

procedure Drop;
begin
if (P07_InvFull) then
P07_DropAllExcept([1]);
end;

begin
Drop;
end.

procedures must go before program's begin end.


Where is your setupP07Include :o

From: duke4eva
Thank you, although i would like to learn why i did not have to make a procedure, and does activateclient always have to be in the code to recognize the client you select?


Since it's only one line, I didn't bother making a function/procedure for it. But DannyRS did it in his example.

ActivateClient is so that the Runescape Browser gets activated ( if it's behind other tasks, it'll pop-out to the front )

DannyRS

2013-03-03 17:10:23

From: Sjoekeloe
Where is your setupP07Include :o


Haha, good spot, can't even use my own Include right (I do use srl-007 now tho)