Results 1 to 21 of 21

Thread: RunTime Error

  1. #1
    Join Date
    Jan 2009
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default RunTime Error

    Im having a runtime error on AntiRandoms.scar
    Out Of Range in line 1089 in script C:\Documents and Settings\admin\Desktop\SCAR 3.15\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar

    here is the line from antirandoms.scar
    Code:
    if FindTPAinTPA(Players[CurrentPlayer].NickTPA,TPA,Matches) then  //Length check inside the function ;)
    Im using scar 3.15(duh) and windows xp. Let me know if you know what is wrong. =^) ty.

  2. #2
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Most likely you aren't declaring players right or you don't have a DeclarePlayers procedure.

    Quote Originally Posted by noidea View Post
    I thought there was a problem with chooseoption multi in when using SCAR 3.2. It couldnt find the bitmaps of the menu. Zypher explained it to me.
    If you're using SCAR 3.20 it might also be the problem.

  3. #3
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Aser View Post
    Most likely you aren't declaring players right or you don't have a DeclarePlayers procedure.



    If you're using SCAR 3.20 it might also be the problem.
    he's using 3.15..

    is it a or b?

  4. #4
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    He's using B most likely. He isn't declaring his players.

    ~Sandstorm

  5. #5
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah..

    if it's set up to use 4 players and you only are using 1, delete the lines of the other ones..

  6. #6
    Join Date
    Jan 2009
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No, im not declaring players. Im only using one. Ill go try to figure it out. ty

  7. #7
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    show the script? (take out user and pass)

  8. #8
    Join Date
    Jan 2009
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, here is my script, it is actually only my first script, its an auto alcher.

    Code:
    program SuperAlcher;
    
    {.include SRL/SRL.scar}
    
    var
    x,y,count,fullcount,alchs,bored,talk: integer;
    
    const
    askmagelvl=1;
    tellmagelvl=2;
    
    
    procedure AlchThemAll;
    begin
         FindColorTolerance(x,y,849658,821,498,983,606,5);
         Mouse(x,y,1,1,true);
         wait(200+random(200));
         FindColorTolerance(x,y,8432316,821,498,983,606,5);
         mouse(x,y,1,1,true);
         wait(1100+random(300));
         
    end;
    
    procedure SendReport;
    begin
         AddToReport('*****************************************');
         AddToReport('******WELCOME TO SUPERBATMANS ALCHER*****');
         AddToReport('******REPORT BUGS TO:               *****');
         AddToReport('******WANNAB723@GMAIL.COM           *****');
         AddToReport('*****************************************');
         AddToReport('Total Alchs:                             ');
         AddToReport(IntToStr(fullcount)                        );
         AddToReport('Total XP gained:                         ');
         AddToReport(IntToStr(Alchs)                            );
    end;
    
    
    
    //main//
    begin
         SetupSRL;
         count:=0;
         fullcount:=0;
         alchs:=0;
         bored:=0;
         talk:=0;
         repeat
               ClearReport;
               SendReport;
               AlchThemAll;
               count:=count+1;
               fullcount:=count+1;
               alchs:=fullcount*65;
               bored:=bored+random(7);
               talk:=talk+random(25);
               FindNormalRandoms;
               //Random Check Magic Xp(Antiban);
                 if(count=30+random(50)) then
                  begin
                    Mouse(821,353,3,3,true);
                    wait(500+random(100));
                    MMouse(815,570,3,6);
                    wait(1800+random(900));
                    Mouse(988,348,3,3,true);
                    wait(500+random(300));
                  end;
               //Going Back To Magic Tab If Lost;
                 if(not findcolortolerance(x,y,16284282,812,397,874,434,5)) then
                  begin
                    Mouse(985,352,5,5,true);
                   end;
               //Random Bored(Antiban);
                 if(bored=0) then
                  begin
                    SendArrowSilentWait(0,random(500));
                  end;
                 if(bored=1) then
                  begin
                    SendArrowSilentWait(1,random(500));
                  end;
                 if(bored=2) then
                  begin
                    SendArrowSilentWait(2,random(500));
                  end;
                 if(bored=3) then
                  begin
                    SendArrowSilentWait(3,random(500));
                  end;
               //Random tell Magic lvl/Ask Magic Lvl(antiban);
                 if(talk=13) then
                  begin
                    if(FindColorTolerance(x,y,14474460,268,608,695,679,5)=true) then
                     begin
                          Mouse(x,y,1,1,true);
                          TypeSend('S');
                          wait(200+random(200));
                          TypeSend('M');
                          wait(200+random(200));
                          TypeSend(IntToStr(askmagelvl));
                          wait(200+random(200));
                          Mouse(x,y,1,1,true);
                          TypeSend('S');
                          wait(200+random(200));
                          TypeSend('M');
                          wait(200+random(200));
                          TypeSend(IntToStr(tellmagelvl));
                          wait(200+random(200));
                     end;
                  end;
         until(false)
    end.

  9. #9
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You need to add a DeclarePlayers

    SCAR Code:
    procedure DeclarePlayers;
    begin
      HowManyPlayers  := 2;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :=''; //account name
      Players[0].Pass :=''; //account password
      Players[0].Nick :=''; //3-4 Letters of name
      Players[0].Active:=True; // Active true or false.

      Players[1].Name :=''; //account name
      Players[1].Pass :=''; //account password
      Players[1].Nick :=''; //3-4 Letters of name
      Players[1].Active:=False; // Active true or false.

    Look up some tutorials on multiplayer...
    http://www.villavu.com/forum/showthr...=12858?t=14246

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

    Default

    post just the line in your script thats giving you the error. that Anti Randoms error shouldnt have anything to do with DeclarePlayers at all.

  11. #11
    Join Date
    Jan 2009
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i added this to my procedures:

    Code:
    procedure setupPlayers;
    begin
       CurrentPlayer := 1;
       HowManyPlayers := 1;
       NumberOfPlayers(HowManyPlayers);
       Players[0].Name := 'superbatman';
       Players[0].Pass := 'yomama';
       Players[0].Nick := 'bat';
       Players[0].Active := true;
    end;
    Lolz, go ahead try to use the pass and user.

    and this to the begining of my main:
    Code:
    SetupPlayers;
    and i still get the same errors.


    @ N C D S:
    When i try to include FindNormalRandoms, it finds a problem with AntiRandoms.scar, more specifically, the findtalk part. here is the line it returens an error from:
    Code:
    if FindTPAinTPA(Players[CurrentPlayer].NickTPA,TPA,Matches) then  //Length check inside the function ;)

  12. #12
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    A bit of off topic advice... use SCAR tags instead of code tags.

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

    Default

    @superbatman

    Post the line from your script thats causing the error.

  14. #14
    Join Date
    Jan 2009
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, never knew there was scar tags, sorry.

  15. #15
    Join Date
    Jan 2009
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ummm....

    SCAR Code:
    FindNormalRandoms;

    My Code Worked, it just had a runtime error if i try to include that.

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

    Default

    Delete your Randoms Folder in SRL then Try Re-Downloading SRL.

  17. #17
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    N C D S - It's causing him errors because it's searching for a nickname, but he doesn't have one.

    ~Sandstorm

  18. #18
    Join Date
    Jan 2009
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i added this to my procedures:

    SCAR Code:
    procedure setupPlayers;
    begin
       CurrentPlayer := 1;
       HowManyPlayers := 1;
       NumberOfPlayers(HowManyPlayers);
       Players[0].Name := 'superbatman';
       Players[0].Pass := 'yomama';
       Players[0].Nick := 'bat';
       Players[0].Active := true;
    end;

    Lolz, go ahead try to use the pass and user.

    and this to the begining of my main:
    SCAR Code:
    SetupPlayers;

    and i still get the same errors.
    That didnt help, is there anything wrong with that?

  19. #19
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default I really donna know

    SCAR Code:
    SetupSRL;   // shouldn't that be the beginning of the mainloop....

    Edit: i compiled the original script and this is what the debug reported

    Code:
    Successfully compiled (3858 ms)
    i'd check your Scar and revision too see if it is up to date. Or just re-download the includes

  20. #20
    Join Date
    Jan 2009
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah, it compiles, but if you run the whole code, it comes up with a runtime error when it makes it to findnormalrandoms;

  21. #21
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try setting your nickname to something longer. Try "erbat" or something of the sort.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [Runtime Error] : Exception: buffer error
    By GasMan in forum OSR Help
    Replies: 11
    Last Post: 05-13-2007, 02:07 PM
  2. Runtime Error
    By CamHart in forum OSR Help
    Replies: 2
    Last Post: 11-23-2006, 05:21 AM
  3. Runtime error
    By sk8ter in forum OSR Help
    Replies: 3
    Last Post: 10-30-2006, 01:55 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
  •