Results 1 to 7 of 7

Thread: Compiling error?

  1. #1
    Join Date
    May 2008
    Location
    California
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Compiling error?

    I'm trying to make a PowerCutter and keep getting this compiling error. What am I doing wrong?

    SCAR Code:
    program PowerCutter;
    {.include srl/srl.scar}

    const
    ms1='z0mg tis is boaring!'; //Random Message for AntiBan
    ms2='*sighs'; //Random Message for AntiBan
    ms3='Woodcutting Lvls?'; //Random Message for AntiBan

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; //your runescape account
      Players[0].Pass := ''; // your runescape password of your account
      Players[0].Nick := ''; // 2-4 letters to use for antirandoms
      Players[0].Active := True; // use this character?

    end;

    Procedure Login;
    begin
      if LoggedIn then Exit;
      loginplayer;
    end

    Procedure AB;
    begin
      if(not(LoggedIn))then Exit;
      case Random(6) of

        0: begin
             HoverSkill('Attack', false);
             wait(2453+Random(432));
           end;
        1: begin
             pickupmouse;
           end;
        2: begin
             MakeCompass('N');
             wait(10+random(5));
             MakeCompass('S');
             MakeCompass('N');
           end;
        3: begin
             GameTab(1 + Random(12));
             wait(800 + random(500));
             GameTab(4);
           end;
        4: begin
             BoredHuman;
           end;
        5: begin
             DoEmote(400 + Random(90));
           end;
        6: begin
             case Random(3) of
               0: Typesend(Ms1);
               1: Typesend(Ms2);
               2: Typesend(Ms3);
           end;
    end;

    Procedure AntiRandom;
    Begin
      FindNormalRandoms;
      findfight;
      FindNonInventoryRandoms;
    end;

    Procedure findfight;
    begin
      Begin
      If(FindFight) then
      Begin
        Begin
          RunAway(RunDir,False,1,8000+Random(3000))
        end;
      end;
    end;

    Procedure AutoMine;
    begin

    end;

    begin
      SetupSRL;
      Disguise('iTunes');
      ActivateClient;
      Login;
      Repeat
        AB;
        AntiRandom;
        Automine;
      until False
    end.

    The error is Line 28: [Error] (16247:1): Semicolon (';') expected in script

    Line 28 is
    SCAR Code:
    Procedure AB;
    so I'm not sure what the problem is.
    Thanks.

  2. #2
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    You're missing a semicolon at the end of the procedure above it.
    :-)

  3. #3
    Join Date
    May 2008
    Location
    California
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright, Thanks!

    That fixed that error, but now I get a syntax error on line 65.

    Line 65 is
    SCAR Code:
    Procedure AntiRandom;

  4. #4
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    You need two more end;s in your AB; procedure, because each case needs an end;.
    :-)

  5. #5
    Join Date
    May 2008
    Location
    California
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Can you demonstrate what you mean?

  6. #6
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Something like this. Notice how each case has an end; at the end of it.

    SCAR Code:
    case Random(5) of
      0: case Random(2) of
        0: doThis;
        1: doThat;
      end;
      1: blah;
      2: blahblah;
      3: moreblah;
      4: enoughblah;
    end;
    :-)

  7. #7
    Join Date
    May 2008
    Location
    California
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Works perfectly now! Thanks!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Compiling Error
    By kevin0095 in forum OSR Help
    Replies: 4
    Last Post: 03-07-2009, 04:06 AM
  2. Replies: 7
    Last Post: 09-20-2008, 02:32 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
  •