Results 1 to 11 of 11

Thread: Unknown identifier 'FindTextTPA'

  1. #1
    Join Date
    Feb 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Unknown identifier 'FindTextTPA'

    I have a new problem. I'm now getting an Identifier Expected error where the "end." is

    SCAR Code:
    program New;
    {.include srl/srl/misc/smart.scar}
    {.include srl/srl.scar}

    const {
    'feb' (Falador East Bank)
    'fwb' (Falador West Bank)
    'veb' (Varrock East Bank)
    'vwb' (Varrock West Bank)
    'db'  (Draynor Bank)
    'akb' (Al-Kharid Bank)  }

    bankloc = 'vwb';


    Procedure DeclarePlayers;
    Begin
      HowManyPlayers:= 1;              // How many players are you using
      CurrentPlayer:= 0;               //
      NumberOfPlayers(HowManyPlayers); //

      Players[0].Name := ''; // Username.
      Players[0].Pass := 'whoa forgot this'; // Password.
      Players[0].Nick := '';    // 2-4 letters of Username (that are not capital letters or numbers).
      Players[0].Active := True;
    End;

    var
    timestarted:Integer;

    Procedure WaitAndAntiban;
    begin
        case Random(30) of
          0..20: wait(5000 + random(10000));
          21: begin
               randommovement;
               MakeCompass('N');
               SetAngle(true);
               wait(random(5000));
             end;
          22,24: begin
               GameTab(2 + random(10));
               Wait(1000+random(5000));
               GameTab(4);
               wait(random(5000));
             end;
          23,25: SleepAndMoveMouse(1232+random(857));
          26..30: begin
          wait(random(5000));
          HoverSkill('cooking', False);
          wait(random(5000));
          end;
    end;

    begin
      SMARTSetupEx(133, False, True, False);
      Wait(5000);
      SetTargetDC(SmartGetDC);
      repeat
        Wait(100);
      until (SmartGetColor(253, 233) <> 1118604);
      SetUpSRL;
      DeclarePlayers;
      WriteLn('Logging in...');
      LoginPlayer;

      repeat
      WriteLn('Opening bank...');
      OpenBankFast(bankloc);
      DepositAll;
      FixBank;
      FixBankTab;
      WriteLn('Withdrawing 14 of column 1 row 1...');
      Withdraw(1, 1, 14);
      WriteLn('Withdrawing 14 of column 2 row 1...');
      Withdraw(2, 1, 14);
      CloseBank();
      //Use items with eachother
      MouseItem(1 + random(10), False);
      ChooseOption('Use');
      MouseItem(15 + random(10), True);

      Mouse(235, 398, 50, 50, False);  //Center of chat screen where the Make Item window is
      ChooseOption('Make All');
      MarkTime(timestarted);
     
      repeat
      WaitAndAntiban;
      until (TimeFromMark(timestarted) > 17000);
      until(not LoggedIn);
     
      end.

    Old first post for archival:
    I'm trying to write a first script. I have this so far:
    SCAR Code:
    program New;
    {.include srl/srl/misc/smart.scar}
    {.include srl/srl/core/bank.scar}
    {.include srl/srl.scar}

    const {
    'feb' (Falador East Bank)
    'fwb' (Falador West Bank)
    'veb' (Varrock East Bank)
    'vwb' (Varrock West Bank)
    'db'  (Draynor Bank)
    'akb' (Al-Kharid Bank)  }

    bankloc = 'vwb'

    Procedure DeclarePlayers;
    Begin
      HowManyPlayers:= 1;              // How many players are you using
      CurrentPlayer:= 0;               //
      NumberOfPlayers(HowManyPlayers); //

      Players[0].Name := 'srl'; // Username.
      Players[0].Pass := 'srl'; // Password.
      Players[0].Nick := 'srl';    // 2-4 letters of Username (that are not capital letters or numbers).
      Players[0].Active := True;
    End;

    begin

    end.

    But since I included the bank include, i get this error when running:
    Code:
    Line 39: [Error] (148:11): Unknown identifier 'FindTextTPA' in script C:\Program Files\SCAR 3.20\includes\srl/srl/core/bank.scar
    and line 39 of bank.scar is:
    SCAR Code:
    Result := FindTextTPA(4106994, 20, 20, 22, 400, 45, 'Bank', upchars, Nothing);
    Last edited by freebullets; 06-08-2009 at 03:51 AM.

  2. #2
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    get rid of bank include

    and add a ; to bankloc = 'vwb'

  3. #3
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You don't need this:
    SCAR Code:
    {.include srl/srl/core/bank.scar}

    Because it is already in SRL.Scar, delete that line to make the script work.

  4. #4
    Join Date
    Feb 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    o...mmmk
    that should do it

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

    Default

    For future reference, anything that's in the Core folder of SRL is included by default when you include the main SRL file.

  6. #6
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Furthermore these are called in SRL/SRL.Scar :

    SCAR Code:
    //----------------------------------------------------------------------------//
    //--                         SRL Level 1 Includes                           --//
    //--                                                                        --//
    //--        Low Level SCAR Math, Mouse Movement and Color routines.         --//
    //----------------------------------------------------------------------------//

    {.include SRL/SRL/Core/Globals.scar}
    {.include SRL/SRL/Core/Math.scar}
    {.include SRL/SRL/Core/Mouse.scar}
    {.include SRL/SRL/Core/Color.scar}
    {.include SRL/SRL/Core/Players.scar}
    {.include SRL/SRL/Core/Overwrite.scar}

    //----------------------------------------------------------------------------//
    //--                         SRL Level 2 Includes                           --//
    //--                                                                        --//
    //--                  Interface, Object and OCR routines.                   --//
    //----------------------------------------------------------------------------//

    {.include SRL/SRL/Core/Timing.scar}
    {.include SRL/SRL/Core/GameTab.scar}
    {.include SRL/SRL/Core/SRLLog.scar}
    {.include SRL/SRL/Core/Text.scar}
    {.include SRL/SRL/Core/Inventory.scar}
    {.include SRL/SRL/Core/Object.scar}

    //----------------------------------------------------------------------------//
    //--                         SRL Level 3 Includes                           --//
    //--                                                                        --//
    //--       MapWalking, AntiRandoms, Bank, Symbol and many more...           --//
    //----------------------------------------------------------------------------//

    {.include SRL/SRL/Core/Bitmaps.scar}
    {.include SRL/SRL/Core/FlagChat.scar}
    {.include SRL/SRL/Core/Login.scar}
    {.include SRL/SRL/Core/Mapwalk.scar}
    {.include SRL/SRL/Core/Bank.scar}
    {.include SRL/SRL/Core/Symbol.scar}
    {.include SRL/SRL/Core/RC.scar}
    {.include SRL/SRL/Core/AutoColor.scar}
    {.include SRL/SRL/Core/Globalstats.scar}
    {.include SRL/SRL/Core/CAutoRespond.scar}
    {.include SRL/SRL/Core/Amount.scar}
    {.include SRL/SRL/Core/AntiRandoms/Common.scar}
    {.include SRL/SRL/Core/AntiRandoms/Certer.scar}
    {.include SRL/SRL/Core/AntiRandoms/Demon.scar}
    {.include SRL/SRL/Core/AntiRandoms/Forester.scar}
    {.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
    {.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
    {.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
    {.include SRL/SRL/Core/AntiRandoms/Leo.scar}
    {.include SRL/SRL/Core/AntiRandoms/Frog.scar}
    {.include SRL/SRL/Core/AntiRandoms/Molly.scar}
    {.include SRL/SRL/Core/AntiRandoms/Pillory.scar}
    {.include SRL/SRL/Core/Antirandoms/Pinball.scar}
    {.include SRL/SRL/Core/Antirandoms/Maze.scar}
    {.include SRL/SRL/Core/Antirandoms/CapnArnav.scar}
    {.include SRL/SRL/Core/Antirandoms/BeeKeeper.scar}
    {.include SRL/SRL/Core/AntiRandoms/Abyss.scar}
    {.include SRL/SRL/Core/AntiRandoms/Mordaut.scar}
    {.include SRL/SRL/Core/AntiRandoms/PrisonPete.scar}
    {.include SRL/SRL/Core/AntiRandoms/Mime.scar}
    {.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
    {.include SRL/SRL/Core/AntiBan.scar}

  7. #7
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SetupSrl;
    No?
    ~Hermen

  8. #8
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wouldn't fix it. Just delete {.include srl/srl/core/bank.scar}.

  9. #9
    Join Date
    Feb 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have a new problem. I'm now getting an Identifier Expected error where the "end." is

    SCAR Code:
    program New;
    {.include srl/srl/misc/smart.scar}
    {.include srl/srl.scar}

    const {
    'feb' (Falador East Bank)
    'fwb' (Falador West Bank)
    'veb' (Varrock East Bank)
    'vwb' (Varrock West Bank)
    'db'  (Draynor Bank)
    'akb' (Al-Kharid Bank)  }

    bankloc = 'vwb';


    Procedure DeclarePlayers;
    Begin
      HowManyPlayers:= 1;              // How many players are you using
      CurrentPlayer:= 0;               //
      NumberOfPlayers(HowManyPlayers); //

      Players[0].Name := ''; // Username.
      Players[0].Pass := 'whoa forgot this'; // Password.
      Players[0].Nick := '';    // 2-4 letters of Username (that are not capital letters or numbers).
      Players[0].Active := True;
    End;

    var
    timestarted:Integer;

    Procedure WaitAndAntiban;
    begin
        case Random(30) of
          0..20: wait(5000 + random(10000));
          21: begin
               randommovement;
               MakeCompass('N');
               SetAngle(true);
               wait(random(5000));
             end;
          22,24: begin
               GameTab(2 + random(10));
               Wait(1000+random(5000));
               GameTab(4);
               wait(random(5000));
             end;
          23,25: SleepAndMoveMouse(1232+random(857));
          26..30: begin
          wait(random(5000));
          HoverSkill('cooking', False);
          wait(random(5000));
          end;
    end;

    begin
      SMARTSetupEx(133, False, True, False);
      Wait(5000);
      SetTargetDC(SmartGetDC);
      repeat
        Wait(100);
      until (SmartGetColor(253, 233) <> 1118604);
      SetUpSRL;
      DeclarePlayers;
      WriteLn('Logging in...');
      LoginPlayer;

      repeat
      WriteLn('Opening bank...');
      OpenBankFast(bankloc);
      DepositAll;
      FixBank;
      FixBankTab;
      WriteLn('Withdrawing 14 of column 1 row 1...');
      Withdraw(1, 1, 14);
      WriteLn('Withdrawing 14 of column 2 row 1...');
      Withdraw(2, 1, 14);
      CloseBank();
      //Use items with eachother
      MouseItem(1 + random(10), False);
      ChooseOption('Use');
      MouseItem(15 + random(10), True);

      Mouse(235, 398, 50, 50, False);  //Center of chat screen where the Make Item window is
      ChooseOption('Make All');
      MarkTime(timestarted);
     
      repeat
      WaitAndAntiban;
      until (TimeFromMark(timestarted) > 17000);
      until(not LoggedIn);
     
      end.

  10. #10
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    watiandantiban should be this:

    SCAR Code:
    Procedure WaitAndAntiban;
    begin
      case Random(30) of
        0..20: wait(5000 + random(10000));
        21:
        begin
          randommovement;
          MakeCompass('N');
          SetAngle(true);
          wait(random(5000));
        end;
        22,24:
        begin
          GameTab(2 + random(10));
          Wait(1000+random(5000));
          GameTab(4);
          wait(random(5000));
        end;
        23,25: SleepAndMoveMouse(1232+random(857));
        26..30:
        begin
          wait(random(5000));
          HoverSkill('cooking', False);
          wait(random(5000));
        end;
      end;
    end;
    “Ignorance, the root and the stem of every evil.”

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

    Default

    Change this:
    SCAR Code:
    Procedure WaitAndAntiban;
    begin
        case Random(30) of
          0..20: wait(5000 + random(10000));
          21: begin
               randommovement;
               MakeCompass('N');
               SetAngle(true);
               wait(random(5000));
             end;
          22,24: begin
               GameTab(2 + random(10));
               Wait(1000+random(5000));
               GameTab(4);
               wait(random(5000));
             end;
          23,25: SleepAndMoveMouse(1232+random(857));
          26..30: begin
          wait(random(5000));
          HoverSkill('cooking', False);
          wait(random(5000));
          end;
    end;
    To this:
    SCAR Code:
    Procedure WaitAndAntiban;
    begin
        case Random(30) of
          0..20: wait(5000 + random(10000));
          21: begin
               randommovement;
               MakeCompass('N');
               SetAngle(true);
               wait(random(5000));
             end;
          22,24: begin
               GameTab(2 + random(10));
               Wait(1000+random(5000));
               GameTab(4);
               wait(random(5000));
             end;
          23,25: SleepAndMoveMouse(1232+random(857));
          26..30: begin
          wait(random(5000));
          HoverSkill('cooking', False);
          wait(random(5000));
          end;
      end;
    end;

    Edit: Wow, ninja'd by 5 whole minutes. Boy, am I ever slow today.

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
  •