Results 1 to 9 of 9

Thread: login failing?

  1. #1
    Join Date
    Aug 2007
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [RESOLVED] login failing?

    Alright, first skeleton script attempt. Both LoginPlayer and NextPlayer are failing to do anything, but replacing LoginPlayer with my own Login function works. Obviously, I'd rather use SRL though.

    SCAR Code:
    program HolyChickens;
    {.include SRL\SRL.scar}

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

      Players[0].Name        := '';
      {.... etc ...}
    end;

    procedure Login(which : Integer); begin
      Mouse(450,290,30,12,true);
      TypeSend(Players[which].Name);
      TypeSend(Players[which].Pass);
      Mouse(300,320,30,12,true);
    end;

    begin
      SetupSRL;
      ClearDebug;
      writeLn('................script header............');
      DeclarePlayers;
      LoginPlayer;

      repeat
        NextPlayer(true);
      until(false);
    end.

    Here's the debug output:
    Code:
    NextPlayer
    ** Warning in GameTab: 14 does not exist**
    NextPlayer
    ** Warning in GameTab: 14 does not exist**
    NextPlayer
    Any idea what I'm doing wrong?

  2. #2
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    You can't have NextPlayer right after you log in. Also, don't put that in a loop. Make that a separate procedure.

    If you put some functions after LoginPlayer then you should be good

    I could easily be wrong though.

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  3. #3
    Join Date
    Aug 2007
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    If you put some functions after LoginPlayer then you should be good
    You were right, thanks. ActivateClient helped too. I can't learn anything without copying other people's scripts (which i can't even get to work )

    Fixed code (fyi):

    SCAR Code:
    begin
      SetupSRL;
      ClearDebug;
      writeLn('................script header............');
      DeclarePlayers;
     
      ActivateClient;
      Wait(1000);
      LoginPlayer;

      repeat
        Wait(10000);
        NextPlayer(true);
      until(false);
    end.

  4. #4
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

  5. #5
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Why? That is how to write an auto login, srl's works just fine

    and I'm glad I could help!

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  6. #6
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Duh, I just asked him to read it. Not rocket science?

  7. #7
    Join Date
    Aug 2007
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Maybe read this tutorial:
    That would be awesome except it's not using available SRL functions :/

    Thanks though

  8. #8
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Did you write something in Player.Name or Password?


  9. #9
    Join Date
    Aug 2007
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I already resolved this up in the 3rd post lol. Maybe I should change the title

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. AutoColour is 100% failing.
    By HarryJames in forum OSR Help
    Replies: 12
    Last Post: 01-28-2009, 06:49 PM
  2. Fuctions just failing on me
    By SirPa in forum OSR Help
    Replies: 10
    Last Post: 11-05-2008, 10:45 AM
  3. Why are all the scripts I use failing?
    By Zodia in forum News and General
    Replies: 4
    Last Post: 05-22-2007, 08:24 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
  •