SRL Archive - Help and Support

Script Error - "Identifier expected in script"


puj

2006-04-25 13:22:27

I am making a simple bone buryer to start making scripts (Was meant to be an easy first script).

I get the following error:

Failed when compiling
Line 32: [Error] (10808:1): Identifier expected in script C:\Program Files\SCAR 2.03\Scripts\bone buryer.scar

There is not really much of a script there yet! here it is anyway:

program BoneBuryer;
{.include SRL/SRL.scar}


//******************** Set These Constants if Needed *******************//

const Bonecolour = 12502724;


//************************************************************************//

Procedure PickUpBone;
begin
repeat
if(FindObj(x, y, 'Bones', Bonecolour, 5))then
begin
Mouse(x, y, 1, 1, true);
Wait(500+random(1000));
end;

//*************************************************************************//
//
// Main EventLoop
//
//*************************************************************************//
begin
SetupSRL;
SetRun(true);
repeat
FindNormalRandoms;
PickUpBone;
until(false)
end.

I havent even put in the drop bones part yet. LOL

Hope someone can tell me whats wrong with it.

phantombmx

2006-04-25 13:38:29

end pickupbone and put unti(whatever)… change it to this

procedure PickUpBone;
begin
repeat
if(FindObj(x, y, 'Bones', Bonecolour, 5))then
begin
Mouse(x, y, 1, 1, true);
Wait(500+random(1000));
end;
until(false)
end;

you can change the param for until to anything you want

puj

2006-04-25 15:07:10

From: phantombmx
end pickupbone and put unti(whatever)… change it to this

procedure PickUpBone;
begin
repeat
if(FindObj(x, y, 'Bones', Bonecolour, 5))then
begin
Mouse(x, y, 1, 1, true);
Wait(500+random(1000));
end;
until(false)
end;

you can change the param for until to anything you want


thanks, now i can get back to work :)

The Un-Named

2006-04-26 04:38:48

From: puj
Procedure PickUpBone;
[B]begin[/B]
[b]repeat[/B]
if(FindObj(x, y, 'Bones', Bonecolour, 5))then
[b]begin[/B]
Mouse(x, y, 1, 1, true);
Wait(500+random(1000));
end;


For every start there must be an end, for every loop there must be a limmit.