Results 1 to 8 of 8

Thread: Identifier Expected

  1. #1
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Identifier Expected

    I get it at line 382, at the
    Code:
    end.
    SCAR Code:
    var kill :integer;
    begin
      setupsrl;
      DeclarePlayers;
      cleardebug;
      activateclient;
      repeat
        if(not(loggedin))then
        Loginplayer;
        setrun(true)
        makecompass('w');
        Setangle(true);
        Setskiller;
        Retaliate(true);
      repeat
        kill:=0;
        Findnormalrandoms;
        makecompass('w');
        LCHK;
        findmouse;
        eatwhatchooser;
        finddead;
      until(kill>=(Players[currentplayer].integers[0]))
      if (kill>=(Players[currentplayer].integers[0])) then logout;
      Disguise('Succesful');
      proggy;
      terminatescript;
    end.

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    You need another until(); You have 2 repeats but only 1 until();

  3. #3
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    As i suspected. Thanks.

    Edit: Any idea where i put it

  4. #4
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    I would just take out the first Repeat.

    Also, wouldn't declaring Kill as 0 every time the second Repeat..Until loops starts mean that it will never meet Players[CurrentPlayer].Integers[0]?

    Richard
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  5. #5
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Boreas showed me this because what i wanted it to do was to repeat until the last player is done. I'm not pointing at Boreas nor blaming him but its what he showed me.

  6. #6
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    var kill :integer;
    begin
      setupsrl;
      DeclarePlayers;
      cleardebug;
      activateclient;
      repeat
        if(not(loggedin))then
        Loginplayer;
        setrun(true)
        makecompass('w');
        Setangle(true);
        Setskiller;
        Retaliate(true);
        repeat
          kill:=0;
          Findnormalrandoms;
          makecompass('w');
          LCHK;
          findmouse;
          eatwhatchooser;
          finddead;
        until(kill>=(Players[currentplayer].integers[0]))
        if (kill>=(Players[currentplayer].integers[0])) then logout;
      until(false); //here?  Creates a main loop then
      Disguise('Succesful');
      proggy;
      terminatescript;
    end.

    Would make sense.

    Instead of the Logout, you could put NextPlayer(False) so it switches players also.

  7. #7
    Join Date
    Oct 2006
    Posts
    500
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Junkj View Post
    As i suspected. Thanks.

    Edit: Any idea where i put it
    lol, if you suspected it then why did you ask?

    But I fixed your script and Standardized it:

    Code:
    var
      Kill : Integer;
      
    begin
      SetupSRL;
      DeclarePlayers;
      ClearDebug;
      ActivateClient;
      repeat
        Kill := 0; //Resets to 0 for every new player.
        if not LoggedIn then
          LoginPlayer;
        SetRun(True)
        MakeCompass('w');
        SetAngle(True);
        SetSkiller;
        Retaliate(True);
        repeat
          FindNormalRandoms;
          //MakeCompass('w');  // Why repeat this ?
          LCHK;
          FindMouse;
          EatWhatChooser;
          FindDead;
        until(Kill >= Players[CurrentPlayer].Integers[0])
        //if (Kill >= Players[CurrentPlayer].Integers[0]) then LogOut;  // Unecessary as this is going to be true.
        LogOut;                                                         // The above loop only breaks if it is true.
        Proggy;
      until(AllPlayersInactive); // Repeats loop until all players are Inactive.
      Disguise('Successful');
      //TerminateScript;  // Unecessary as the script will end anyway.
    end.
    Last edited by Rick; 09-05-2009 at 02:11 AM. Reason: Added AllPlayersInactive [What he wants]

  8. #8
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks rich but i need make compass west because it would keep trying to find the castle colors.

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
  •