I wanted to add an 'and' statement to my code. I'm getting the error:
Error: Invalid evaluation at line 86
Compiling failed.
I put line 86 in bold.
Code:procedure StartGame; var x, y: Integer; begin if FindColorTolerance(x, y, 16721078, 420, 630, 550, 700, 0) and if (FindColorTolerance(x, y, 54616, 280, 720, 468, 794, 3) = false) then MoveMouse(376, 930); HoldMouse(x, y, mouse_Left); ClickMouse(x, y, mouse_Left); writeLn('Found Start Menu'); writeLn('Begining Game'); collectcoins; writeLn('Collecting coins.'); StartGame; if FindColor(x, y, 16744512, 182, 1000, 559, 1055) then writeLn('Finding Play Button'); PlayAgain; writeLn('Allowing five seconds to optionally close out the bot.'); wait(5000); collectcoins; if FindColorTolerance(x, y, 54616, 280, 720, 468, 794, 3) then begin LevelUp; end end;


Reply With Quote