Results 1 to 4 of 4

Thread: Unknown Error

  1. #1
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Unknown Error

    SCAR Code:
    program New;
    {.include SRL\SRL\Misc\Smart.scar}
    {.include SRL\SRL.scar}
    {.include SRL\SRL\Reflection\Reflection.scar}

    const
      World = 126;

    var
      x, y: integer;

    procedure DeclarePlayers;
    begin
      CurrentPlayer := 0;
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
     
      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
    end;

    function WaitWhileFish: boolean;
    var TMyPlayer: TMe;
    begin
      TMyPlayer := GetMe;
      repeat
        Wait(100);
        FindNormalRandoms;
      until(TMyPlayer.Animation = -1);
      Result := True;
    end;

    function FindFishingSpot(x, y: integer): boolean;
    var
      FishSpot: TNPC;
      FishSpotPoint: TPoint;
    begin
      try
        if not FindNPC('Fishing spot', FishSpot) then Exit;
        FishSpotPoint := FishSpot.MS;
        MMouse(FishSpotPoint.x, FishSpotPoint.y, 5, 5);
        Wait(125 + Random(350));
        Result := IsUpText('Fishing spot');
        if Result then
          GetMousePos(x, y);
      except
        srl_Warn('FindFishingSpot', 'Couldn''t find fishing spot!', -1);
    end;

    function SetupSmart: boolean; //This line!!!<<<<<<<<<<<<<<
    begin
      try
        SmartSetupEx(World, True, True, False);
        SetTargetDC(SmartGetDC);
        while not RSReady do Wait(100);
        Result := True;
      except
        srl_Warn('SetupSmart', 'Couldn''t load SMART!', -1);
    end;

    begin
    SetupSRL;
    if SetupSmart then
    begin
      if FindFishingSpot(x, y) then
      begin
        Mouse(x, y, 0, 0, True);
        WaitWhileFish;
      end;
    end;
    end.


    I get this error:
    Code:
    Failed when compiling
    Line 52: [Error] (17741:1): Identifier expected in script C:\Program Files\SCAR 3.15\Scripts\Fishingspot Finder.scar
    Help?

  2. #2
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    I believe you need to finish your try case with an end;. Try adding one after your srl_Warn line.
    :-)

  3. #3
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That's what I needed!

    Thanks.

  4. #4
    Join Date
    Sep 2008
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I hate simple errors that play hide and seek

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Unknown Error...
    By reece844 in forum OSR Help
    Replies: 3
    Last Post: 10-17-2007, 08:54 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
  •