Results 1 to 3 of 3

Thread: Identifier expected?

  1. #1
    Join Date
    Apr 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Identifier expected?

    Hi guys getting the error stated in the title in my script, Tryed a few different things am new to this language and havent got any books on it or anything Problem is on line 27 pointed out below.

    Simba Code:
    program Mahatnasproject;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    Procedure DeclarePlayers;
    begin

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

    Players[0].Name := 'eko';
    Players[0].Pass := 'nigger';
    Players[0].Nick := 'ger';  // E.G griff721 would be riff.
    Players[0].Active:=True; // If you want current user to use this script
         end;

         procedure ChopTree;
         var x, y: integer;
         begin
         if FindObj(x, y, 'hop', 5481339, 35)then   // X, Y = where the mouse should be
         begin
         Mouse(x, y, 2,2, false); // the 2,2 are random movements the mouse makes
         ChooseOption('hop');
         repeat
         wait(1200+random(250)); //Wait 1000milsecons.
         Until not IsUpText('ew') or (InvFull); // do untill 'txt' comes on screen
         until(InvFull); <---- Line 27
         end;
    end;
    begin
     SetUpSRL;
     ActivateClient;
     DeclarePlayers;
     LoginPlayer;
     ChopTree;
     end.
    Last edited by Mahatna; 04-27-2012 at 04:18 PM.

  2. #2
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    You're missing a repeat for the last until.


    EDIT:
    Simba Code:
    repeat //First repeat
         wait(1200+random(250));
    Until not IsUpText('ew') or (InvFull); //First Until
    until(InvFull); // There is no repeat for this until

  3. #3
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Fix'd that standards a bit, not all. If you space your script right these problem are easier to spot:

    Simba Code:
    program Mahatnasproject;
    {$DEFINE SMART}
    {$i srl/srl.simba}

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := 'username';
      Players[0].Pass := 'pass';
      Players[0].Nick := 'erna';  // E.G griff721 would be riff.
      Players[0].Active := True; // If you want current user to use this script
    end;

    procedure ChopTree;
    var
      x, y: integer;
    begin
      if FindObj(x, y, 'hop', 5481339, 35)then   // X, Y = where the mouse should be
      begin
        Mouse(x, y, 2,2, false); // the 2,2 are random movements the mouse makes
        ChooseOption('hop');
        repeat //added
          repeat
            wait(1200+random(250)); //Wait 1000milsecons.
          until not IsUpText('ew') or (InvFull); // do untill 'txt' comes on screen
        until(InvFull); <---- Line 27
      end;
    end;

    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
      ChopTree;
    end.
    Working on: Tithe Farmer

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
  •