Results 1 to 10 of 10

Thread: Colon expected?

  1. #1
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Colon expected?

    Does someone know how to fix this error? I know my script needs a lot of improvements; if you've got hints/improvements for my script, then please say so xD



    SCAR Code:
    program BankBury;
      {.include SRL/SRL.scar}

    const
      RunDirection = 'N';
      BoneType = 'Normal Bones'; //What do you want to bury?
                        //Normal Bones     Big bones
      BankLoc = 'feb';  //List of banks:
                        //feb = Falador east bank        fwb = Falador west bank
                        //veb = Varrock east bank        vwb = Varrock west bank
                        //akb = al kharid bank           db = draynor bank
                        //eb = edgeville bank

    var x, y, BonesDTM, BigBonesDTM : integer;
        Done : boolean;

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

         Players[0].Name :='';
         Players[0].Pass :='';
         Players[0].Nick :='';
         Players[0].Active:=True;
      end;

    procedure LoadDTM;
      begin
        BonesDTM := DTMFromString('78DA633CC9C8C02003C448E0CAB9730CFC401' +
           'A24FA1F0818AF0259B2A86A40B25C503560DE09204B85809A7340' +
           '9608013507812C71026AF60359D2F8D500007F080C22');
        BigBonesDTM := DTMFromString('78DA639464646098C98002F66DDD0AA619A17' +
           'C4665206B21031A604455A30264CD20A04604C89A4B400D3F9035' +
           '8B801A39206B0A0135C284D50000B84E0729');
      end;

    procedure FindRandom;

    var i:integer;

      begin
        if not(LoggedIn) then Exit;
        for i:=1 to 3 do
          begin
            case i of
            1: if FindMod then
              begin
                writeln('Found Moderator.');
                Logout;
              end;
            2: FindNormalRandoms;
            3: if FindFight then
             begin
               RunAway(RunDirection, true, 1, 5500+Random(1000));
             end;
          end;
        end;
      end;

    procedure AntiBan;
      begin
        if not LoggedIn then Exit;
          case random(10) of
            0 : MMouse(0, 0, 700, 500);
            1 : Hoverskill('Prayer', false);
            2 : BoredHuman;
            3 : RandomMovement;
            4 : GameTab(1);
            5 : PickupMouse;
            6 : GameTab(2);
            7 : RandomMovement;
            8 : HoverSkill('random', false);
            9 : begin
                 MakeCompass('N');
                 Wait(10+random(5));
                 MakeCompass('S');
                 Wait(10+random(5));
                 MakeCompass('N');
                end;
      end;
    end;

    procedure WithdrawBones;
    var i:integer;

    begin
    case random(2) of
      1 : OpenBankFast(BankLoc);
      2 : FindObjCustom(x, y, ['ank', 'ooth'], [1792105, 4615547, 2970721], 0);
          mouse(x, y, 2, 2, false);
          Wait(1000+Random(1000));
            if BankScreen then
              DepositAll;
              SearchBank('Bones');
              for i := 1 to 2 do
              case i of
                1: if (Bonetype = 'Normal Bones') then
                     if(FindDTM(BonesDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
                     mouse(x, y, 2, 2, false);
                     if not ChooseOption('ll') then
                     TerminateScript;
                     end else
                     wait(2000+random(200));
                     writeln('Normal Bones Withdrawed!');
                     end else
                     begin
                     TerminateScript;
                     Writeln('Couldnt find bones');
                     end;
                   end;
                2: if(Bonetype = 'Big Bones') then
                     if(FindDTM(BigBonesDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
                     mouse(x, y, 2, 2, false);
                     ChooseOption('ll');
                     wait(2000+random(200));
                     writeln('Big Bones Withdrawed!');
                     end else
                      begin
                      TerminateScript;
                     Writeln('Couldnt find bones');
                     end;
                   end;
            end;
            if not BankScreen then
            TerminateScript;
      end;

     end;
    end;

    procedure BuryBones;
    var i:integer;
    begin
      if not(Loggedin) then Exit;
      Gametab(4);
      MakeCompass('N');
     repeat
      FindRandom
        for i := 1 to 2 do
            case i of
            1: if (Bonetype = 'Normal Bones') then
                  begin
                  if(FindDTM(BonesDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
                   mouse(x, y, 2, 2, true);
                   wait(2000+random(50));
                   end;
                   until(not FindDTM(BonesDTM, x, y, MIX1, MIY1, MIX2, MIY2) or FindRandom);
                   wait(1000+random(500));
                   writeln('Load of Bones Buried')
                   end;
                   end;
                 end;
            2: if(Bonetype = 'Big Bones') then
                if(FindDTM(BigBonesDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
                   mouse(x, y, 2, 2, true);
                   wait(2000+random(50));
                   end;
                   until(not FindDTM(BigBonesDTM, x, y, MIX1, MIY1, MIX2, MIY2) or FindRandom);
                   wait(1000+random(500));
                   writeln('Load of Bones Buried')
                   end;
                end;
           end;
    End;

    procedure TerminateScript;
     begin
     FreeDTM(BonesDTM);
     FreeDTM(BigBonesDTM);
     Logout;

    procedure SetupScript;
    begin
      cleardebug;
      writeln('Impiwimpi');
      writeln('BankBury');
      SetupSRL;
      mousespeed := 13;
      declareplayers;
      activateclient;
      wait(500);
    end;

    begin
      SetupScript;
      if (not (LoggedIn)) then
      begin
        LoginPlayer;
        SetAngle(true);
        Wait(500 + random(30))
        SetChat('on', 1);
        SetChat('friends', 2);
        SetChat('off', 3);
      end;
      repeat
      LoadDTM;
      WithdrawBones;
      BuryBones;
      FindRandom;
      AntiBan;
    end.

  2. #2
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    colon expected where?

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  3. #3
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    In your WithdrawBones procedure, you need to add a begin and end; to case 2. Also, with random(2) your cases should be 0 and 1, not 1 and 2.

  4. #4
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for your help Senrath

    The error occurred in line 92: mouse(x, y, 2, 2, false);

  5. #5
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Also in terminateScript procedure you need to end it with an end;

    In the main loop you have a repeat and you need an until();

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  6. #6
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by HyperSecret View Post
    Also in terminateScript procedure you need to end it with an end;

    In the main loop you have a repeat and you need an until();
    Thanks, can I make my withdraw procedure into a boolean?
    Then I could make something like until(WithdrawBones:=false)

  7. #7
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If Not FindDTM() Then Result := False;

    Thats all you need. Remember to change it to a function.


  8. #8
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm very thankfull for your help but what can I do about the colon error?

  9. #9
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by impiwimpi View Post
    I'm very thankfull for your help but what can I do about the colon error?
    I already told you what to do.

  10. #10
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, thank you
    Got any other ideas/improvements for my script?
    Does anyone know how to add something behind Repeat...Until ? Cause I get syntax error when i use Begin....End;
    SCAR Code:
    procedure BuryBones;
    var i:integer;
    begin
      if not(Loggedin) then Exit;
      Gametab(4);
      MakeCompass('N');
     repeat
      FindRandom
       begin;
        for i := 1 to 2 do
            case i of
            1: if (Bonetype = 'Normal Bones') then
                  if(FindDTM(BonesDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
                   repeat
                   mouse(x, y, 2, 2, true);
                   wait(2000+random(50));
                   until (not (FindDTM(BonesDTM, x, y, MIX1, MIY1, MIX2, MIY2)));
                  begin[COLOR="Red"]---------->This Line!!![/COLOR]
                  wait(1000+random(500));
                  writeln('Load of Bones Buried')
                  end;
            2: if(Bonetype = 'Big Bones') then
                if(FindDTM(BigBonesDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
                   mouse(x, y, 2, 2, true);
                   wait(2000+random(50));
                   end;
                   until(not FindDTM(BigBonesDTM, x, y, MIX1, MIY1, MIX2, MIY2) or FindRandom);
                   wait(1000+random(500));
                   writeln('Load of Bones Buried')
                   end;
                end;
       end;    end;
    End;

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Colon expected...but where?!
    By Rich in forum OSR Help
    Replies: 3
    Last Post: 05-17-2008, 02:28 PM
  2. Colon expected.
    By skilld u in forum OSR Help
    Replies: 2
    Last Post: 02-24-2008, 11:54 PM
  3. Colon expected...
    By supersayian2224 in forum OSR Help
    Replies: 7
    Last Post: 07-09-2007, 09:37 PM
  4. colon expected ??
    By Ipewnjoo in forum OSR Help
    Replies: 5
    Last Post: 07-01-2007, 09:59 PM
  5. Colon Expected
    By Hey321 in forum OSR Help
    Replies: 3
    Last Post: 01-28-2007, 01:00 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
  •