Results 1 to 3 of 3

Thread: error in script

  1. #1
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default error in script

    i get
    Code:
    Line 155: [Error] (12646:1): Identifier expected in script
    with this procedure
    SCAR Code:
    procedure EatFood;
    begin
      if not LoggedIn then exit;
      if (eat = 'Yes') then
        begin
          repeat
            if (gethp < Eathp) then
              begin
                Gametab(4)
                  FindColorTolerance(x, y, Foodcolor, MIX1, MIY1, MIX2, MIY2, 4)
                    then
                begin
                  if isuptext(foodname); then
                    Mouse(x, y, 5, 5, true);
          until (gethp > eathp) or (not (LoggedIn));
      else
        WriteLn('could not find food')
                end;
              end;
        end;
    end;

    i know its not anything to do with begins or ends i think it has something to do with the repeat and untill but i cant figure it out so i hope somone can see what i cant lol



  2. #2
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    SCAR Code:
    procedure EatFood;
    begin
      if (not (LoggedIn)) then exit;
      if (eat = 'Yes') then
        begin
          repeat
            if (gethp < Eathp) then
              begin
                Gametab(4); //Forgot a ';'
                 if FindColorTolerance(x, y, Foodcolor, MIX1, MIY1, MIX2, MIY2, 4) //Added an 'if' statement
                    then
                begin
                  if isuptext(foodname) then //No ';' in 'if' statement!
                  begin
                    Mouse(x, y, 5, 5, true);
                  end else//Moved this, and 'Else' alone wont work, u need an 'end', WITHOUT ';' OR '.'!
                  begin //Try to add begins and ends after 'if's
                      WriteLn('could not find food'); //';' Added!
                  end;//Try to add begins and ends after 'if's
                end;
              end;
            until ((gethp > eathp) or (not (LoggedIn))); //Messed up some '('s   AND,
            //                                                                   all begins within this
            //                                                                   repeat must also have ends within this repeat
        end;
    end;

    This compiles for me
    Ce ne sont que des gueux


  3. #3
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    thanks



Thread Information

Users Browsing this Thread

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

Similar Threads

  1. 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
  2. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  3. Error: Cannot Fix Script - Error Overgrowth - Begin Headdesking
    By PhantasmalScripter in forum OSR Help
    Replies: 6
    Last Post: 12-23-2006, 12:50 AM

Posting Permissions

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