Results 1 to 3 of 3

Thread: Identifier Expected in Script?

  1. #1
    Join Date
    Jul 2007
    Posts
    217
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Identifier Expected in Script?

    Line 64: [Error] (12819:11): Identifier expected in script C:\Program Files\SCAR 3.15b\Scripts\fletcher.scar

    I cannot find a place where my Begins and ends are mismatched, is there something i don't understand about Identifier Expected? Also could you tell me if ChooseOption('X') would work becaue it is capital? Thanks for the Help.

    Note: the script is not done, I was just trying to test it from what I have done.
    SCAR Code:
    program fletcher ;
    {.include SRL/SRL/Misc/Smart.scar}
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Fletching.scar}

    const
      SmartWorld = 76;
      Signed     = True;
      Loads      = 20 ;  // loads to do before switching players
      PinNmbr    = '' ; //your pin number leave blank if you don't have
      Skill      = 'Fletching'; // skill to use lamps on
    var x, y: integer;

    procedure DeclarePlayers ;
    begin

      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers) ;
      CurrentPlayer := 0
     
      Players[0].Name   := 'Username' ;
      Players[0].Pass   := 'Password' ;
      Players[0].Nick   := 'rnam' ;  //3-4 letters of username; not first
      Players[0].Active := True ;
     
    end;

    procedure Randoms;
    begin
      If(FindFight)then
      RunAway('N', True,1,15000) ;
      FindNormalRandoms ;
      FindTalk ;
      SolveChatRandom ;
      SolvePinball ;
      DwarfItem ;
      LampSkill := (Skill) ;
    end ;

    procedure AntiBan ;
    begin
      if not LoggedIn then Exit ;
      case Random(30) of
        1: RandomRClick ;
        2: HoverSkill('Woodcutting', False) ;
        3: RandomMovement ;
        4: BoredHuman ;
        5: AlmostLogout ;
        6: DoEmote(400 +Random(90)) ;
      end;
    end;

    procedure StartFletch ;
    begin
      if FindObjTPA(x, y, 1919571, 11, -1, 7, 7, 15, ['Willow Logs']) then
        begin
          Mouse(x, y, 5, 5, true) ;
          Wait(1000+random(300)) ;
          if FindObjTPA(x, y, 6842480, 11, -1, 7, 7, 15, ['Knife']) then
            begin
              Mouse(x, y, 5, 5, true) ;
              Wait(1000+ random(350)) ;
              MMouse(259, 444, 5, 5) ;
              Wait(700) + random(400)) ;
              Mouse(259, 444, 5, 5, false ;
              Wait(1000 + random(400)) ;
              ChooseOption('X') ;
              Wait(1000 + random(400)) ;
              TypeSend('27') ;
            end ;
        end ;
    end ;
             
    procedure SetupSmart;
    begin
      SmartSetupEx(SmartWorld, false, Signed);
      ClearDebug;
      WriteLn('Setting up Smart... Please Hold...');
      Wait(10000 + random(5000));
      SetTargetDC(SmartGetDC);
      While not(SmartReady) do Wait(100);
    end;


    begin
      SetupSRL;
      SetupSmart;
      DeclarePlayers;
      Randoms;
      Antiban;
      StartFletch ;
    end.

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

    Default

    SCAR Code:
    Wait(700) + random(400)) ;
    Should be:
    SCAR Code:
    Wait(700 + random(400)) ;
    FindObjTPA doesnt find things in the inv.

    close a round here:
    SCAR Code:
    Mouse(259, 444, 5, 5, false ;

    Remove :
    SCAR Code:
    FindTalk ;
      SolveChatRandom ;
      SolvePinball ;

    And yes, it would recognize X if its capital or it isnt.

    This:
    SCAR Code:
    MMouse(259, 444, 5, 5) ;
              Wait(700) + random(400)) ;
              Mouse(259, 444, 5, 5, false ;
    Why MMouse wait Mouse?
    Just a Mouse...:
    SCAR Code:
    Mouse(259, 444, 5, 5, false ;
    I think you meant x,y not 256,444


  3. #3
    Join Date
    Jul 2007
    Posts
    217
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    idk lol, but thaNKS

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Identifier expected in script...But Why?
    By Macrosoft in forum OSR Help
    Replies: 10
    Last Post: 01-27-2012, 06:33 AM
  2. Bah!! Identifier Expected in Script.
    By siroober in forum OSR Help
    Replies: 3
    Last Post: 05-03-2008, 11:46 PM
  3. Identifier expected in script
    By StrikerX in forum OSR Help
    Replies: 2
    Last Post: 04-11-2008, 12:21 PM
  4. Identifier expected in script
    By Becks in forum OSR Help
    Replies: 6
    Last Post: 04-11-2008, 06:41 AM
  5. Identifier expected in script?
    By steth1010 in forum OSR Help
    Replies: 6
    Last Post: 05-06-2007, 09:03 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
  •