Log in

View Full Version : Unknown Identifier, Need assistance :D



JMCross
12-07-2012, 12:05 AM
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
12-07-2012, 12:08 AM
Define SRL in the beginning. Are you using this with smart? Define it with smart then as well.

JMCross
12-07-2012, 12:10 AM
Ooh, so I have to {$i SRL/SRL.simba}?

Not SMART, it's for RSPS.

kevin33
12-07-2012, 12:16 AM
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
12-11-2012, 09:45 AM
Use this as a start for making scripts



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

begin


end.

Wardancer
12-11-2012, 06:58 PM
^^^^
You don't want {$DEFINE SMART} in your script if you're using it for RSPS.