Results 1 to 4 of 4

Thread: Why does this procedure loop for ever?

  1. #1
    Join Date
    Dec 2011
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Why does this procedure loop for ever?

    Simba Code:
    procedure Resting;
     var
      s: String;
    begin
       if not loggedin then exit;
      FindNormalRandoms;
      Report;
      Antiban;
      DidRedClick;

      begin
        if (Not runenergy(50)) then
        begin
        Repeat
        Report;
        Until (RestUntil(RandomRange(90,100)));
        end;
       end;
       end;

    This procedure was working fine yesterday but today it just does continuous loops for ever. It's like the procedure doesn't know when the energy has reach the set percent.

    I was thinking it's a SRL problem, can someone help please.

  2. #2
    Join Date
    Feb 2011
    Location
    Wisconsin
    Posts
    398
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    Why are you calling DidRedClick without actually clicking on anything?

  3. #3
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    "RestUntil" itself already creates a loop within the function that rests (waits) until you're at your desired energy. So putting a function with a preexisting loop inside of a loop... doesn't make alot of sense, does it?

    Try this instead:
    Simba Code:
    procedure Resting;
      var
        S: String;
      begin
        if not loggedin then exit;
        FindNormalRandoms;
        Report;
        Antiban;
        DidRedClick;  //Why?

        if (GetMMLevels('run', S) <= 50) then
          RestUntil(RandomRange(90,100))
      end;

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  4. #4
    Join Date
    Dec 2011
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    "RestUntil" itself already creates a loop within the function that rests (waits) until you're at your desired energy. So putting a function with a preexisting loop inside of a loop... doesn't make alot of sense, does it?

    Try this instead:
    Simba Code:
    procedure Resting;
      var
        S: String;
      begin
        if not loggedin then exit;
        FindNormalRandoms;
        Report;
        Antiban;
        DidRedClick;  //Why?

        if (GetMMLevels('run', S) <= 50) then
          RestUntil(RandomRange(90,100))
      end;
    Yeah i don't know why i put didredclick in there lol, thanks for the help.

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
  •