Results 1 to 5 of 5

Thread: Need some help!

  1. #1
    Join Date
    May 2007
    Location
    in a pineapple under the sea
    Posts
    1,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Need some help!

    SCAR Code:
    procedure Pickupitem;
    Var
       Dx,Dy: Integer;

    Begin
    If Pickup then
    begin
      If (FindObj(Dx, Dy, 'ake', Pick1, MonTol)) Then
        Items:= Items + +1;
        Mouse(Dx,Dy,4,4,true)
      else
      If (FindObj(Dx, Dy, 'ake', Pick2, MonTol)) Then
        Items:= Items + +1;
        Mouse(Dx,Dy,4,4,true);
      Flag;
      FindFastRandoms;
      end;
    end;

    Failed when compiling
    Line 161: [Error] (15617:1): Identifier expected in script C:\Program Files\SCAR 3.06\Scripts\TFighter1.0.scar
    This will probably have errors too then
    SCAR Code:
    procedure BuryBones;

    Var
       Dx,Dy: Integer;

    Begin
    If Bones then
    begin
      If (FindObj(Dx, Dy, 'ake', Bonecolor, MonTol)) Then
        Mouse(Dx,Dy,4,4,true);
        Writeln('Bones Found')
      else
        Writeln('Bones Not Found')
      end;


      If (FindObj(744, 437, 'ury', Boneinvcolor, MonTol)) Then
        Mouse(Dx,Dy,4,4,true);
        Buried:= Buried + +1;
      end;
      If (FindObj(785, 437, 'ury', Boneinvcolor, MonTol)) Then
        Mouse(Dx,Dy,4,4,true);
        Buried:= Buried + +1;
      end;
      If (FindObj(829, 437, 'ury', Boneinvcolor, MonTol)) Then
        Mouse(Dx,Dy,4,4,true);
        Buried:= Buried + +1;
      end;
      If (FindObj(702, 475, 'ury', Boneinvcolor, MonTol)) Then
        Mouse(Dx,Dy,4,4,true);
        Buried:= Buried + +1;
      end;
      If (FindObj(744, 475, 'ury', Boneinvcolor, MonTol)) Then
        Mouse(Dx,Dy,4,4,true);
        Buried:= Buried + +1;
      end;
      end;
    end;

    thank you for your help
    [SIZE="4"][CENTER][URL="http://www.youtube.com/watch?v=5YsGJz3j4os"]LOL u mad bro?[/URL][/CENTER][/SIZE]

  2. #2
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    which line is 161?

  3. #3
    Join Date
    May 2007
    Location
    in a pineapple under the sea
    Posts
    1,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    umm the one near the else not sure... i have been editing the script and the line # moved.
    [SIZE="4"][CENTER][URL="http://www.youtube.com/watch?v=5YsGJz3j4os"]LOL u mad bro?[/URL][/CENTER][/SIZE]

  4. #4
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    the lines that are like

    Items:= Items + +1;

    are probably your problem

  5. #5
    Join Date
    Apr 2007
    Posts
    220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here this procedure was wrong.. Here I fixed it:
    SCAR Code:
    procedure Pickupitem;
    Var
       Dx,Dy: Integer;

    Begin
    If Pickup then
      begin
        If(FindObj(Dx, Dy, 'ake', Pick1, MonTol))or
          (FindObj(Dx, Dy, 'ake', Pick2, MonTol))Then
          begin
            Items:= Items + 1; //You did 2 +'s here so I removed one.
            Mouse(Dx,Dy,4,4,true)
          end else
          begin
            Writeln('Couldn''t find it')
          end;
        Flag;
        FindFastRandoms;
      end;
    end;
    If you don't understand it feel free to ask

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
  •