Results 1 to 3 of 3

Thread: Next Player Endless Loop

  1. #1
    Join Date
    Apr 2007
    Posts
    379
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Next Player Endless Loop

    I need a way to fix this or else my Script doesn't do it's shut off procedure because my script hangs in the endless loop. I saw someone post a fix but I can't find it. If someone else can find it please tell me, because My script doesn't turn off like it should because the loop.

  2. #2
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Maybe you can make some type of procedure

    idk very simple and idk how well it'd work but just to give you some kind of idea or somethin?

    SCAR Code:
    Function SwitchMyPlayers(Active: Boolean): Boolean;
    var
      i, p : Integer;
    begin
      Players[CurrentPlayer].Active := Active;  //makes your player active or not
      for i := 0 to (HowManyPlayers - 1) do  //checks how many players are active
        if (Players[i].Active = True) then p := p + 1;
      if (p = 0) then  //if none are active then exits and function is false
      begin
        Result := False;
        Exit;
      end;
      NextPlayerOrder(Active);  //switches players if there are active players
    end;

    begin
      if not SwitchMyPlayers(False) then //if player switching doesn't work then do whatever
      begin
        ProgressReport;
        TerminateScript;
      end;
    end.

  3. #3
    Join Date
    Apr 2007
    Posts
    379
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I saw someone post a fix to place right into a script with no need to rewrite anything, but oh well I will try something like this, Thanks for the ideas.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Ultimate Merchanter (first player to player seller!)
    By Timothegreat in forum RS3 Outdated / Broken Scripts
    Replies: 63
    Last Post: 05-14-2009, 02:07 PM
  2. Player not found in player array?quikchat?
    By jerrysyron in forum OSR Help
    Replies: 2
    Last Post: 08-01-2008, 12:44 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
  •