Results 1 to 8 of 8

Thread: Syntax Error My *cough*

  1. #1
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Syntax Error My *cough*

    SCAR Code:
    function EatCheck : boolean;
    begin
      if (gethp < Players[CurrentPlayer].Integers[1]) then
      begin
        writeln('eating');
        gametab(4);
        if findcolortolerance(x,y, Players[CurrentPlayer].Integers[0], 552, 209, 729, 460, 5) then
        begin
          MMouse(x,y,0,0);
          if isuptext(Players[CurrentPlayer].Strings[0]) then
          begin
            Mouse(x, y, 0, 0, true);
          end else
            Result := False;
            Exit;
          end;
        end else
          result := False;
          exit;
        end;
      end;//Line 92: [Error] (14787:1): 'BEGIN' expected in scr
      result := True;
    end;

    wth?
    ~ Metagen

  2. #2
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function EatCheck : boolean;
    begin
      if (gethp < Players[CurrentPlayer].Integers[1]) then
      begin
        writeln('eating');
        gametab(4);
        if findcolortolerance(x,y, Players[CurrentPlayer].Integers[0], 552, 209, 729, 460, 5) then
        begin
          MMouse(x,y,0,0);
          if isuptext(Players[CurrentPlayer].Strings[0]) then
          begin
            Mouse(x, y, 0, 0, true);
          end else
            Result := False;
            Exit;
        end else
          result := False;
          exit;
      end;
      result := True;
    end;

    you had 1 end to much

  3. #3
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    NONONO UR WRONG!!! that cant be... i think i found a flaw in scar!! AHHHH!!!

    Wait Wait!! calm myself.. i figured it out

    i have to put a begin after my end elses

    i never figured out those if statements -.-
    ~ Metagen

  4. #4
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  5. #5
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yea i know ur way would have helped, but my script woldnt have worked. i got it to do it now thanx
    ~ Metagen

  6. #6
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function EatCheck : boolean;
    begin
      if (gethp < Players[CurrentPlayer].Integers[1]) then
      begin
        writeln('eating');
        gametab(4);
        if findcolortolerance(x,y, Players[CurrentPlayer].Integers[0], 552, 209, 729, 460, 5) then
        begin
          MMouse(x,y,0,0);
          if isuptext(Players[CurrentPlayer].Strings[0]) then
          begin
            Mouse(x, y, 0, 0, true);
          end else
          begin
            Result := False;
            Exit;
          end;
        end else
        begin
          result := False;
          exit;
        end;
      end;//Line 92: [Error] (14787:1): 'BEGIN' expected in scr
      result := True;
    end;

    it would be this
    anyway,, good luck.

  7. #7
    Join Date
    Oct 2007
    Posts
    302
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Why exactly must there be equal ends + begin? ..

  8. #8
    Join Date
    Jun 2007
    Posts
    1,312
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    A begin goes on until it finds an end =/
    Active only during the Summer...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. *Cough* Unbanned from Macroing *Cough*
    By P1nky in forum News and General
    Replies: 26
    Last Post: 10-08-2008, 08:13 PM
  2. Line 135: [Error] (14845:1): Syntax error in script
    By AbsTrACt'^.| in forum OSR Help
    Replies: 16
    Last Post: 05-23-2008, 01:14 PM
  3. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  4. if, then, else syntax error?
    By kissdemon in forum OSR Help
    Replies: 4
    Last Post: 09-13-2007, 09:49 PM

Posting Permissions

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