SRL Archive - Help

Unknown Identifier, Need assistance :D


JMCross

2012-12-06 19:05:29

Ey, was doing a little script writing, and I took a template and wrote over it with a diffrent code, as I was nearing the testing phase, it wouldnt compile stating unknown identifier???

program Huntsman;
var
X,Y: Integer;
procedure sum;
begin
//1
wait(1000)
FindObjCustom(x,y,['alk', 'talk', 'untsman', 'igli'], [1788491, 1324599, 1524033, 1656390, 2556967], 3)
MMouse(X, Y, 1, 1);
ClickMouse2(True);
Writeln('Talking to Hunter, Cross yer fingers');
Wait(600+random(250));
Waitoption('rade', 3000);
Wait(3500+random(250));
end;



Error] (9:7): Unknown identifier 'FindObjCustom' at line 8
Compiling failed.

Rezozo

2012-12-06 19:08:22

Define SRL in the beginning. Are you using this with smart? Define it with smart then as well.

JMCross

2012-12-06 19:10:15

Ooh, so I have to {$i SRL/SRL.simba}?

Not SMART, it's for RSPS.

kevin33

2012-12-06 19:16:03

Well you need to declare FindObjCustom before that particular procedure. You must state it as a function (refer to list of functions in SRL resource) and then you can declare it later like in this procedure I believe. FindObjCustom is a function because it will return something, in this case a true/false and follow through with what you ask it to do.

Please correct me if I am wrong. I have not looked at scripting in quite a long time.

kazhual

2012-12-11 04:45:21

Use this as a start for making scripts



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

begin


end.


Wardancer

2012-12-11 13:58:05

^^^^
You don't want {$DEFINE SMART} in your script if you're using it for RSPS.