Results 1 to 14 of 14

Thread: Runtime error with animating

  1. #1
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Runtime error with animating

    Edit: Probably randomly stopped. Thanks for the help

    I'm trying to use animating in the first script I've coded in years and I'm getting this runtime error

    "[Runtime Error] : Exception: Access violation at address 005113D9 in module 'scar.exe'. Read of address 0DDB9000 in line 44 in script C:\Program Files (x86)\SCAR 3.22\includes\SRL\SRL\Core\Animation.scar"

    with this Procedure

    Code:
     Procedure Cut;
    begin
       Boxxy := (IntToBox(206, 119, 296, 221));
       MakeCompass('n');
       SetAngle(true);
       writeln('Attempting to find tree to cut');
       repeat
      if(FindcolorspiralTolerance(x, y, 1852469, 2, 2, 518, 337, 10))then
      begin
         mouse(x, y, 3, 3, false);
         wait(350+random(200));
         chooseoption('hop d');
         wait(500+random(500));
         Boxxy := IntToBox(206, 119, 296, 221);
           if(Animating(Boxxy, 1000, 50))then
           begin
           FindNormalRandoms;
           BoredHuman;
           end;
      end;
      until(false)
    end;
    Any help would be appreciated.
    Last edited by bbri06; 12-21-2009 at 08:11 AM.

  2. #2
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Have you targeted the client?
    Have you updated SRL?
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  3. #3
    Join Date
    Jan 2008
    Location
    Houston, Texas, USA
    Posts
    770
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Restarting scar should solve that...

  4. #4
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sex View Post
    Have you targeted the client?
    Have you updated SRL?
    If you're using SMART, you don't have to target the client, right?

  5. #5
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by bbri06 View Post
    If you're using SMART, you don't have to target the client, right?
    Correct.

    But do as FEAR advised, that might work.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  6. #6
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm, well I just updated SRL and I have restarted SCAR. Still getting the error.

    Edit: I'll just post the whole script. Maybe the problem is somewhere in there.

    Code:
    program New;
    
    {.include SRL/SRL/Misc/SMART.scar}
    {.include SRL/SRL.scar}
    
    var SmartWorldNo, x, y, a, b: integer;
        Tree: integer;
        statuscheck: string;
        Boxxy: TBox;
    
    
    procedure DeclarePlayers;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      Players[0].Name        := 'nothing1221';          //Player username
      Players[0].Pass        := '';          //Player password
      Players[0].Nick        := 'othi';          //Player nickname - 3 or 4 letters of your player name (no spaces or capitals).Players[0].Active      := True;        //Is the player active (do you want to auto on this acc)?
      Players[0].Active      := True;
      Players[0].Strings[0]  := 'Free';      //'Free' or 'Members'
      
    end;
    
    Procedure ToTrees;
    begin
    writeln('Attempting to find trees');
    MakeCompass('n');
    SetAngle(true);
    LoadSymbolBitmapColor('Fishing Spot');
    wait(100+random(150));
    If(FindSymbol(x, y, 'fishing spot'))then
       begin
       writeln('Found Fishing spot, attemtping to walk to');
       mouse(x, y, 4, 4, true)
       Fflag(0);
       end;
    if(FindSymbol(x, y, 'fishing spot'))then
       writeln('At Trees');
    end;
    
    Procedure Cut;
    begin
       Boxxy := (IntToBox(206, 119, 296, 221));
       MakeCompass('n');
       SetAngle(true);
       writeln('Attempting to find tree to cut');
       repeat
      if(FindcolorspiralTolerance(x, y, 1852469, 2, 2, 518, 337, 10))then
      begin
         mouse(x, y, 3, 3, false);
         wait(350+random(200));
         chooseoption('hop d');
         wait(500+random(500));
         Boxxy := IntToBox(206, 119, 296, 221);
           if(Animating(Boxxy, 1000, 50))then
           begin
           FindNormalRandoms;
           BoredHuman;
           end;
      end;
      until(false)
    end;
    
    
    begin
      SmartWorldNo := 0;
      {$IFDEF SRL_SMART}
      Smart_Server := SmartWorldNo;
      {$ENDIF}
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      ActivateClient;
    //  ToTrees;
      repeat
      Cut;
      until(false)
    end.
    Last edited by bbri06; 12-19-2009 at 10:26 PM.

  7. #7
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    You left your password in the script.
    I've changed it and PMed it to you.

    I'll edit this when I find a solution.

    Edit: Try deleting ActivateClient; (line 73).
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  8. #8
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You're a real good guy, thanks. I reminded myself about 10 times not to do that then proceeded to do it anyways -.-

    Removing activate client didn't work.

  9. #9
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Happened to the best Even to me (not that I am -that- good).

    With what did you update SRL? Dev or public?
    Ce ne sont que des gueux


  10. #10
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm updated to the Dev.

  11. #11
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Hmm... I haven't used the newly added Animation.scar yet >.> Try looking up who made Animate(); and PM them.
    Ce ne sont que des gueux


  12. #12
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Good Idea, I'll do that.

  13. #13
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Yeah there seems to nothing wrong with your code at all and it looks as if the procedure would be at fault (no biggie, everybody makes mistakes, I think marpis made the procedure, how about trying to contact them).
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  14. #14
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

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
  •