Results 1 to 9 of 9

Thread: Need help with script

  1. #1
    Join Date
    Jun 2012
    Location
    United kingdom
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help with script

    hi, looking at your tutorials and videos for about a month now and my brother has been teaching me a bit and i've managed to throw together a flax script.

    i keep getting this error and i have no idea what to do and my brother is out, any help please?


    [Error] (51:2): Closing square bracket (']') expected at line 50
    Compiling failed.

  2. #2
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Post your full script here with simba tags.

  3. #3
    Join Date
    Jun 2012
    Location
    United kingdom
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by CephaXz View Post
    Post your full script here with simba tags.
    simba tags?

  4. #4
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Reply post with clicking "Go Advanced". There's a button with lion head. Post your script in between the tags.

  5. #5
    Join Date
    Jun 2012
    Location
    United kingdom
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    program QAZsflaxFinder;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i SPS/sps.simba}

    // Start in seers village bank

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

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

    Var
     myPath:TPointArray;
     myPrath:TPointArray;

    Procedure StatsGuise(wat:String);
     Begin
      Status(wat);
      Disguise(wat);
     end;

    procedure AntiBan;
    begin
      if(not(LoggedIn))then
      Exit;
      case Random(8) of
       0:
       begin
         HoverSkill('Mining', false);
         wait(2453+Random(432));
       end;
       1: PickUpMouse;
       2:
       begin
         MakeCompass('N');
         wait(100+random(133));
         MakeCompass('S');
         wait(50+random(133));
         MakeCompass('N');
       end;
      end;
    end;

    Procedure RunToFlax;
     begin
      if not LoggedIn then Exit;
     RestUntil(100);
     SPS_Setup(RUNESCAPE_SURFACE,['6_6','6_7','7_7']);
     myPath := [Point(2740, 2692), Point(2741, 2760), Point(2744, 2830), Point(2779, 2880), Point(2807, 2856)
     SPS_WalkPath(myPath)
     end;

    Procedure PickFlax;
    var
    i: Integer;
    begin
      if not (LoggedIn) then
        Exit;
      if not (FindNormalRandoms) then
      begin
        SetAngle(SRL_ANGLE_HIGH);
        while (InvCount < 28) do
        begin
          while (IsMoving) do
          X:= MSCX;
          Y:= MSCY+30;
          Wait(RandomRange(1000, 1500));
          if(FindColorSpiralTolerance(X, Y, 14407266, MSX1, MSY1, MSX2, MSY2, 41)) then
          begin
            Mouse(X, Y, 10, 10, true);
            Wait(RandomRange(500, 1000));
            AntiBan;
          end else
            Break;
        end;
      end;
    end;


    Procedure ToBank;
     begin
      if not LoggedIn then Exit;
     RestUntil(100);
     SPS_Setup(RUNESCAPE_SURFACE,['7_7','6_7','6_6'];
     myPath := [Point(2801, 2875), Point(2766, 2879), Point(2746, 2825), Point(2730, 2763), Point(2740, 2710), Point(2736, 2675)];
     SPS_WalkPath(myPath)
     end;

    Procedure BankFlax;
     begin
     FindNormalRandoms;
      SetAngle(SRL_ANGLE_HIGH);
      wait(2000)
      OpenBankFast('clt')
          if PinScreen then
        InPin(Players[0].Pin);
      WriteLn('Opened bank. Depositing flax...');
      wait(3000);
      DepositAll();
      CloseBank;
      Antiban;
      WriteLn('finished banking. Resting...');
      Antiban;
      wait(1500);
      RestUntil(100);
     end;

    begin
      Smart_Server      := 3;
      Smart_Members     := False;
      Smart_Signed      := True;
      Smart_SuperDetail := False;

      ClearDebug;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
     repeat
      RunToFlax;
      PickFlax;
      ToBank;
      BankFlax;
     until(not LoggedIn)
    end.

  6. #6
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    program QAZsflaxFinder;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i SPS/sps.simba}

    // Start in seers village bank

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

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

    Var
     myPath:TPointArray;
     myPrath:TPointArray;  //This is not used too

    Procedure StatsGuise(wat:String);
     Begin
      Status(wat);
      Disguise(wat);
     end;

    procedure AntiBan;
    begin
      if(not(LoggedIn))then
      Exit;
      case Random(8) of
       0:
       begin
         HoverSkill('Mining', false);
         wait(2453+Random(432));
       end;
       1: PickUpMouse;
       2:
       begin
         MakeCompass('N');
         wait(100+random(133));
         MakeCompass('S');
         wait(50+random(133));
         MakeCompass('N');
       end;
      end;
    end;

    Procedure RunToFlax;
     begin
      if not LoggedIn then Exit;
     RestUntil(100);
     SPS_Setup(RUNESCAPE_SURFACE,['6_6','6_7','7_7']);
     myPath := [Point(2740, 2692), Point(2741, 2760), Point(2744, 2830), Point(2779, 2880), Point(2807, 2856)]; //You missed a ] here
     SPS_WalkPath(myPath)
     end;

    Procedure PickFlax;
    var
    i, x, y: Integer;   //You did not declare the variance x and y, and your i is not used in the procedure
    begin
      if not (LoggedIn) then
        Exit;
      if not (FindNormalRandoms) then
      begin
        SetAngle(SRL_ANGLE_HIGH);
        while (InvCount < 28) do
        begin
          while (IsMoving) do
          X:= MSCX;
          Y:= MSCY+30;
          Wait(RandomRange(1000, 1500));
          if(FindColorSpiralTolerance(X, Y, 14407266, MSX1, MSY1, MSX2, MSY2, 41)) then
          begin
            Mouse(X, Y, 10, 10, true);
            Wait(RandomRange(500, 1000));
            AntiBan;
          end else
            Break;
        end;
      end;
    end;


    Procedure ToBank;
     begin
      if not LoggedIn then Exit;
     RestUntil(100);
     SPS_Setup(RUNESCAPE_SURFACE,['7_7','6_7','6_6']); //Missed out ) here
     myPath := [Point(2801, 2875), Point(2766, 2879), Point(2746, 2825), Point(2730, 2763), Point(2740, 2710), Point(2736, 2675)];
     SPS_WalkPath(myPath)
     end;

    Procedure BankFlax;
     begin
     FindNormalRandoms;
      SetAngle(SRL_ANGLE_HIGH);
      wait(2000)
      OpenBankFast('clt')
          if PinScreen then
        InPin(Players[0].Pin);
      WriteLn('Opened bank. Depositing flax...');
      wait(3000);
      DepositAll();
      CloseBank;
      Antiban;
      WriteLn('finished banking. Resting...');
      Antiban;
      wait(1500);
      RestUntil(100);
     end;

    begin
      Smart_Server      := 3;
      Smart_Members     := False;
      Smart_Signed      := True;
      Smart_SuperDetail := False;

      ClearDebug;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
     repeat
      RunToFlax;
      PickFlax;
      ToBank;
      BankFlax;
     until(not LoggedIn)
    end.

  7. #7
    Join Date
    Jun 2012
    Location
    United kingdom
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks alot buddy

  8. #8
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    If you couldn't figure out what was changed in CephaXz post, the error was caused by this procedure
    Simba Code:
    Procedure RunToFlax;
     begin
      if not LoggedIn then Exit;
     RestUntil(100);
     SPS_Setup(RUNESCAPE_SURFACE,['6_6','6_7','7_7']);
     myPath := [Point(2740, 2692), Point(2741, 2760), Point(2744, 2830), Point(2779, 2880), Point(2807, 2856) // THIS LINE IN PARTICULAR
     SPS_WalkPath(myPath)
     end;
    It gave an error because myPath is an array, and arrays require square brackets, one of which you was missing at the end of myPath
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  9. #9
    Join Date
    Jun 2012
    Location
    United kingdom
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Rich View Post
    If you couldn't figure out what was changed in CephaXz post, the error was caused by this procedure
    Simba Code:
    Procedure RunToFlax;
     begin
      if not LoggedIn then Exit;
     RestUntil(100);
     SPS_Setup(RUNESCAPE_SURFACE,['6_6','6_7','7_7']);
     myPath := [Point(2740, 2692), Point(2741, 2760), Point(2744, 2830), Point(2779, 2880), Point(2807, 2856) // THIS LINE IN PARTICULAR
     SPS_WalkPath(myPath)
     end;
    It gave an error because myPath is an array, and arrays require square brackets, one of which you was missing at the end of myPath
    ahhh, thanks for the explanation mate

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
  •