Results 1 to 3 of 3

Thread: Line 40: [Error] (17418:1): Identifier expected in script

  1. #1
    Join Date
    May 2008
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Line 40: [Error] (17418:1): Identifier expected in script

    I've been making a willow chopper for draynor,
    SCAR Code:
    program New;
    {.include srl\srl.scar}
    {.include SRL\SRL\Reflection\Reflection.scar}

    var
    x,y:integer;

    const
    WillowColor = 1337; //Fill this in if it can't find the trees.
    Loads = 1337; // How many loads to do.

    Procedure DeclarePlayers;
    Begin

      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

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

    end;

    Procedure WillowChoppa;
    begin
     Case random(2) of
     0:Begin
       FindObjCustom(x, y, ['hop down','hop','down','Chop Down'], [WillowColor], 3)
       mouse(x,y,2,2,true)
      end;
     1:Begin
        FindObjCustom(x, y, ['hop down','hop','down','Chop Down'], [WillowColor], 3)
       mouse(x,y,2,2,false)
       ChooseOption('Chop down')
      end;
    end;

    Procedure SetupSmart;
    Begin
      SmartSetup('world161', True, True, False);
      Wait(1000);
      SetTargetDC(SmartGetDC);
    end;


    Function PathWalk(Path : array of TPoint; Tol, FlagD : integer): Boolean;
    var
    Count : integer;
    begin
      Count := 0;
      repeat
          Result := WalkToTile(Path[Count], Tol, FlagD);
        if not(Result) then
        begin
          WriteLn('Path walk failed');
          Exit;
        end;
        Count := Count + 1;
      until (not(Result)) or (Count = GetArrayLength(Path))
    end;

    function LoadPath: TPointArray;
    begin
      SetLength(Result, 4);
      Result[0] := Point(3093, 3245);
      Result[1] := Point(3086, 3244);
      Result[2] := Point(3087, 3236);
      Result[3] := Point(3087, 3231);
    end;

    function LoadPath2: TPointArray;
    begin
      SetLength(Result, 4);

      Result[0] := Point(3087, 3231);
      Result[1] := Point(3086, 3244);
      Result[2] := Point(3093, 3246);
      Result[3] := Point(3094, 3242);
    end;

    Procedure WalkToBank;
    Var
      I: Integer;
      Path: TPointArray;

    Begin
      Path := LoadPath2;
      for i := 0 to High(Path) do
        Begin
           WalkToTile(path[i], 3, 0);
        end;
          Wait(500+Random(300));
    end;

    Procedure WalkToWillows;
    Var
      I: Integer;
      Path: TPointArray;

    Begin
      Path := LoadPath;
      for i := 0 to High(Path) do
        Begin
           WalkToTile(path[i], 3, 0);
        end;
          Wait(500+Random(300));
    end;


    Procedure Banking;
    var
    I : Integer;
    begin
     WalkToBank;
     repeat
      //OpenBankquiet(db:String)
     until(bankscreen)
     For I := 2 to 28 do
      deposit(I,28,2);
      WalkToWillows;
    end;


    Begin;
    SetupSRL;
    LoadPath;
    LoadPath2;
    end.
    How do I fix it?

  2. #2
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    replace WillowChoppa; With This
    SCAR Code:
    Procedure WillowChoppa;
    begin
       Case random(2) of
        0:Begin
              FindObjCustom(x, y, ['hop down','hop','down','Chop Down'],[WillowColor],3);
              mouse(x,y,2,2,true);
           end;
        1:Begin
              FindObjCustom(x, y, ['hop down','hop','down','Chop Down'],[WillowColor], 3);
              mouse(x,y,2,2,false);
             ChooseOption('Chop down');
           end;
        end;
    end;
    oh ye use autocolor next time its better

  3. #3
    Join Date
    May 2008
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay thank You, I will try to do that.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 11-02-2008, 12:39 PM
  2. Replies: 10
    Last Post: 06-01-2008, 02:15 PM
  3. Replies: 8
    Last Post: 02-03-2008, 01:58 AM
  4. Replies: 17
    Last Post: 11-14-2007, 07:43 AM

Posting Permissions

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