Results 1 to 5 of 5

Thread: Simple Repeat..Until problem

  1. #1
    Join Date
    Jun 2009
    Location
    New Jersey
    Posts
    154
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Simple Repeat..Until problem

    I just started scripting again and I can't figure this error out.


    Code:
    [Error] (47:3): Semicolon (';') expected at line 46
    Here is the Procedure.

    Simba Code:
    procedure chopTrees;  //Chops Trees until invintory is full
    var
      x, y, i, clickColor : integer;
      treesTPA : TpointArray;
      treeATPA : Array of TpointArray;
    begin
      FindColorsSpiralTolerance(MSCX, MSCY, treesTPA, 1588531, MSX1, MSY1, MSX2, MSY2, 9)
      treeATPA := SplitTPA(treesTPA, 10);
      repeat
        for i := 0 to high(treeATPA) do
          if MiddleTPAEx(treeATPA[i], x, y) then
          begin
            MMouse(x, y, 5, 5);
            Wait(300);
            if IsUpText('ree') then
              begin
                ClickMouse(x, y, 1);
                clickColor := GetColor(x, y);
                treeWait(x, y, clickColor);
                //DebugATPA(treeATPA, 'c');
                break;
              end
          end
      until(InvFull);//this is the line SIMBA Highlights.
    end;      // Line 47
    Take a look at a new OpenDepositBox here.

  2. #2
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    You have to put ";" after all "end"s except the very last one in the entire script (Which gets a ".").

    Example:
    Simba Code:
    program test;

    begin
      if (Blankity) then
      begin
         Wtf;
      end;
    end.

    So it should be:
    Simba Code:
    procedure chopTrees;  //Chops Trees until invintory is full
    var
      x, y, i, clickColor : integer;
      treesTPA : TpointArray;
      treeATPA : Array of TpointArray;
    begin
      FindColorsSpiralTolerance(MSCX, MSCY, treesTPA, 1588531, MSX1, MSY1, MSX2, MSY2, 9)
      treeATPA := SplitTPA(treesTPA, 10);
      repeat
        for i := 0 to high(treeATPA) do
          if MiddleTPAEx(treeATPA[i], x, y) then
          begin
            MMouse(x, y, 5, 5);
            Wait(300);
            if IsUpText('ree') then
              begin
                ClickMouse(x, y, 1);
                clickColor := GetColor(x, y);
                treeWait(x, y, clickColor);
                //DebugATPA(treeATPA, 'c');
                break;
              end;
          end;
      until(InvFull);//this is the line SIMBA Highlights.
    end;      // Line 47

    Quick Note: Work on your standards....

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  3. #3
    Join Date
    Jun 2009
    Location
    New Jersey
    Posts
    154
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow. I completely overlooked that. Thank you.

    The standards are messed up because I'm really not focusing on them right now, I'll fix them later.
    Take a look at a new OpenDepositBox here.

  4. #4
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by Xanith View Post
    Wow. I completely overlooked that. Thank you.

    The standards are messed up because I'm really not focusing on them right now, I'll fix them later.
    Your also missing another semicolon on
    Simba Code:
    FindColorsSpiralTolerance(MSCX, MSCY, treesTPA, 1588531, MSX1, MSY1, MSX2, MSY2, 9)

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  5. #5
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    basically, put a ; after all lines that contain text except lines that ends with a bold word minus "end" and "String"

Thread Information

Users Browsing this Thread

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

Posting Permissions

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