Results 1 to 3 of 3

Thread: Error: Invalid evaluation at line 86 Compiling failed. pls help

  1. #1
    Join Date
    Apr 2017
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Error: Invalid evaluation at line 86 Compiling failed. pls help

    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;
    Last edited by RevanScripts; 04-27-2017 at 09:13 AM. Reason: Clarity

  2. #2
    Join Date
    Apr 2017
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I was under the impression this error message had something to do with a semicolon missing, but I'm not seeing anywhere that I would put one.

  3. #3
    Join Date
    Apr 2017
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Nevermind, I found the problem.

    Code:
    procedure StartGame;
    var
      x, y: Integer;
    begin
      if FindColor(x, y, 16721078, 420, 630, 550, 700) and
      (FindColorTolerance(x, y, 54616, 280, 720, 468, 794, 3) = false) then
        begin
        MoveMouse(376, 930);
        HoldMouse(x, y, mouse_Left);
        ClickMouse(x, y, mouse_Left);
        writeLn('Found Start Menu');
        writeLn('Collecting coins.');
        collectcoins;
        StartGame;
        end
    
      if FindColor(x, y, 16744512, 182, 1000, 559, 1055) then
        begin
        writeLn('Finding Play Button');
        PlayAgain;
        writeLn('Allowing five seconds to optionally close out the bot.');
        wait(5000);
        collectcoins;
        end
    
      if FindColorTolerance(x, y, 54616, 280, 720, 468, 794, 3) then
        begin
        LevelUp;
        end
    end

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •