Jump to content
fallenmercy

error identifier expected

Recommended Posts

i messed with this script i found and i cant figure out why i am getting this error now. it is a auto script for a game

 

[sCAR]

Program auto;

var x, y:integer;

 

 

Procedure kill;

Begin

if(isfkeydown(5)) Then Begin

findcolorspiral(x, y, 825823, 40, 80, 1179, 634)

keydown(113)

wait(50)

clickmouse(x, y, true)

wait(30)

keyup(113)

wait(550)

if(findcolorspiral(x, y, 825823, 316, 206, 614, 304))Then Begin

keydown(38)

wait(20)

keyup(38)

wait(20)

keydown(17)

wait(200)

keyup(17)

wait(20)

if(findcolorspiral(x, y, 825823, 702, 342, 826, 461))Then Begin

keydown(39)

wait(20)

keyup(39)

wait(20)

keydown(17)

wait(200)

keyup(17)

wait(20)

if(findcolorspiral(x, y, 825823, 580, 340, 447, 451))Then Begin

keydown(39)

wait(20)

keyup(39)

wait(20)

keydown(17)

wait(200)

keyup(17)

wait(20)

if(findcolorspiral(x, y, 825823, 662, 306, 895, 183))Then Begin

keydown(37)

wait(20)

keyup(37)

wait(20)

keydown(17)

wait(200)

keyup(17)

wait(20)

if(findcolorspiral(x, y, 825823, 40, 80, 1179, 634)=false)

then begin

wait(1000)

end;

repeat

if(isfkeydown(5)) Then Begin

findcolorspiral(x, y, 825823, 40, 80, 1179, 634)

keydown(113)

wait(50)

clickmouse(x, y, true)

wait(30)

keyup(113)

wait(550)

if(findcolorspiral(x, y, 825823, 316, 206, 614, 304)=true)Then Begin

keydown(38)

wait(20)

keyup(38)

wait(20)

keydown(17)

wait(200)

keyup(17)

wait(20)

if(findcolorspiral(x, y, 825823, 702, 342, 826, 461)=true)Then Begin

keydown(39)

wait(20)

keyup(39)

wait(20)

keydown(17)

wait(200)

keyup(17)

wait(20)

if(findcolorspiral(x, y, 825823, 580, 340, 447, 451)=true)Then Begin

keydown(39)

wait(20)

keyup(39)

wait(20)

keydown(17)

wait(200)

keyup(17)

wait(20)

if(findcolorspiral(x, y, 825823, 662, 306, 895, 183)=true)Then Begin

keydown(37)

wait(20)

keyup(37)

wait(20)

keydown(17)

wait(200)

keyup(17)

wait(20)

if(findcolorspiral(x, y, 825823, 40, 80, 1179, 634)=false)then begin

wait(2000)

end;

until(isfkeydown(6)) or isfkeydown(7);

if(isfkeydown(6))then Begin

clickmouse(174, 39, true)

wait(4050)

clickmouse(1007, 590, true)

end;

if(isfkeydown(7))then begin

wait(100)

keydown(37)

wait(1300)

keyup(37)

wait(300)

keydown(40)

wait(3200)

keyup(40)

wait(300)

keydown(37)

wait(2500)

keyup(37)

wait(200)

If(findcolorspiral(x, y, 3758393, 40, 80, 1179, 634))then begin

clickmouse(x, y, true)

wait(100)

clickmouse(275, 304, true)

wait(100)

findcolorspiral(x, y, 3758393, 40, 80, 1179, 634)

clickmouse(x, y, true)

wait(100)

clickmouse(276, 309, true)

wait(200)

clickmouse(89, 259, true)

wait(200)

clickmouse(89, 259, true)

end

end;

begin

cleardebug

wait(300)

end

end;

begin

cleardebug

repeat

kill

until(isfkeydown(9));

end.

[/sCAR]

Link to comment
Share on other sites

A tip is to CLICK the errormessage, it will take you to the line where the error happened.

 

 

IsFKeyDown is deprecated, so it does not exist in the current SCAR-version. at least tell us what SCAR-version you are using.

 

For newer versions of scar the eq. of IsFKeyDown is:

function IsFKeyDown(const Num: Byte): Boolean;
begin
 Result := False;
 if (Num > 0) and (Num < 25) then
   Result := GetKeyState(VK_F1 + Num - 1);
end;

 

ALSO, YOUR THING IS MISSING __12__ end;-calls. It's so bad I won't even categorize as code... It's gibberish.

I actually don't think I could fix this even if I wanted to, it's that bad... Start over, but first read some tutorials, and create something SHORT and SIMPLE.

 

Also, this code could be simplified SO MUCH with the use of loops.

Edited by slacky
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...