Results 1 to 5 of 5

Thread: need help on a quick annoying error

  1. #1
    Join Date
    Oct 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default need help on a quick annoying error

    program CowKiller;
    {.include srl/srl.scar}
    var
    x,y: Integer;

    const
    CowColor1 = 11909822;
    CowColor2 = 6124171;

    procedure FindCow;
    begin
    FindObjCustom(x, y, ['att', 'ack'], [CowColor1, CowColor2], 5);
    begin
    Mouse(x,y,5,5,False);
    ChooseOption('Attack');
    wait(5000);
    end;

    begin
    ActivateClient;
    SetupSRL;
    FindCow;
    end;
    end;

    Line 4: [Error] (16112:1): Unexpected end of file in script

    please take a look at it

  2. #2
    Join Date
    Oct 2008
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Im a complete noob, but from what i know, the END of the WHOLE script should not be "end;", it sould be "end."

    PUT A FULL STOP AT THE LAST "END", NOT ;

  3. #3
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah a period marks the end of a script a semicolon marks the end of a line


  4. #4
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Remove the two last end; s and replace them with end.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  5. #5
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program CowKiller;
    {.include srl/srl.scar}
    var
      x, y: Integer;

    const
      CowColor1 = 11909822;
      CowColor2 = 6124171;

    procedure FindCow;
    begin
      if FindObjCustom(x, y, ['att', 'ack'], [CowColor1, CowColor2], 5) then
      begin
        Mouse(x, y, 5, 5, False);
        ChooseOption('ttack');
        Wait(5000);
      end;
    end;

    begin
      SetupSRL;
      ActivateClient;
      FindCow;
    end.

    There you go.

    You didn't have an end; at the end of your FindCow procedure.
    You also had a random begin in there -.-

    But. That should work.

    Ask if you still need help

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. annoying error..
    By faster789 in forum OSR Help
    Replies: 10
    Last Post: 04-01-2008, 04:18 AM
  2. Annoying error
    By Cazax in forum OSR Help
    Replies: 3
    Last Post: 03-21-2008, 09:11 PM
  3. Annoying error
    By Rora in forum OSR Help
    Replies: 1
    Last Post: 12-08-2007, 08:08 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
  •