SRL Archive - OSR Help

Indentifier expected


ItsTimmyMan

2012-07-11 07:22:58

So, this is my FIRST ever attempt at a simba script.
I am trying to make a auto attacker and healer on mobster (myspace).
I don't really care about the game, I just thought it would be a good place to learn.

The problem is, when I try to run a script, it says "identifier expected at line 453". Line 453 is where my, [end.] is.

code:
program attackforever;

procedure checkhealth;
var
x, y:integer;
begin
if findcolorspiraltolerance(x, y, 0, 503, 204, 560, 110, 1) then
movemouse(725, 133);
clickmouse(725, 133, 1);
movemouse(1055, 102);
clickmouse(1055, 102, 1);
movemouse(665, 256);
clickmouse(665, 256, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
if findcolorspiraltolerance(x, y, 136, 572, 99, 602, 110, 1) then
begin
end;
clickmouse(661, 333, 1);
begin
end;

begin

checkhealth;

end.

Wreck

2012-07-11 07:45:58

Your ClickMouse's aren't between the begin/end.

ie.
if InvFull then
begin
//everything between begin/end will be done if the inventory is full.
end;

EDIT: The problem you posted about, you're missing an End; put it before
begin
checkhealth;
end.

CephaXz

2012-07-11 07:51:48

That code isn't very efficient to be a good script. Well, for your problem of having the error, you missed an 'end' before your mainloop.

ItsTimmyMan

2012-07-11 08:26:52

I tried it, and also got this error:
"Error: Exception: You passed wrong values to a finder function: ys > ye (204,110). at line 7"


And, with the "begin/end;" problem mentioned, I want it to go back to the next procedure in the main loop if it finds the colour. (colour not color, I'm an Aussie).

riwu

2012-07-11 08:35:30

I suggest u take a look at some of the scripting tutorials here (http://villavu.com/forum/forumdisplay.php?f=95) before u continue any further. the script is in a mess and u could have just use a loop to repeat the same procedures.
If u find the tutorials too hard/boring to read, u can try watch some of yohojo's youtube vid tutorials.

ItsTimmyMan

2012-07-11 08:49:24

Cheers, I'll have a look. Although, I worry about the extent of information on the tutorial, which is why I would rather learn as I go.

I'll read it all anyway, thanks.

CephaXz

2012-07-11 08:51:08

The tutorials are very useful, especially the videos made by Yohojo. I learnt everything about scripting from there and now am able to make scripts myself.