Results 1 to 9 of 9

Thread: ??????

  1. #1
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default ??????

    why do i keep getting this error:
    SCAR Code:
    [Runtime Error] : Exception: Access violation at address 006D691C in module 'scar.exe'. Read of address 00000000 in line 48 in script C:\Program\SCAR 3.15\Scripts\cooker.scar
    in the following script?


    SCAR Code:
    program GEAutoCooker;
    {.include srl/srl.scar}

    const
    Banker = 12506324;
    Banker2 = 1342631;

    var
    willowlogs,tuna,x,y:integer;

    procedure LoadDTMS;
        begin
            willowlogs := DTMFromString('78DA63DCC5C0C090C380025C6D25C0342394C' +
           'FB80A48E432A001465435EB80442A01359B814405013547804431' +
           '01358781440611E610720FC8EF65F8D500005AF909E8');

            tuna := DTMFromString('78DA637CC2C0C090C3800296CD9E05A619A17' +
           'CC607402283010D30A2AAB903242A08A87901244A08A8790F2432' +
           '09A8790324D208A8B909240A08A8794484398F08FB0B007F1A0DD' +
           '3');
       FreeDTM(willowlogs);
       FreeDTM(tuna);

        end;
     


    procedure openiningbank;
        begin
         makecompass('n');
         setangle(true);
         if(FindObj(x, y, 'Bank', Banker, 20))then
            begin
            writeln('Found banker, going to open bank');
            wait(500);
            Mouse(x, y, 5, 5, false);
            chooseoption('ker');
            wait(500+random(100));
            if bankscreen=true then
            writeln('Mission accomplished!!Bank opened');
            wait(500);
            end;
        end;

    procedure takingout;
     begin
       deposit(2,28,true);
      if  FindDTM(willowlogs, x, y, MSx1, MSy1, MSx2, MSy2) then
          begin
           writeln('found logs, gonna take em out.');
            wait(700);
            mouse(x, y, 5, 5, true);
           end;
               if finddtm(tuna, x, y, MSx1, MSy1, MSx2, MSy2) then
            begin
              writeln('found tuna,yum yum, gonna take em out.');
              wait(700);
              mouse(x, y, 5, 5, false);
              chooseoption('All');
              wait(500);
              closebank;
            end;
         
     end;
     
    procedure cooking;
    begin


    end;


    begin
    SetupSRL;
    Activateclient;
    cleardebug;
    LoadDTMS;
    wait(200);
    openiningbank;
    wait(2000+random(500));
    takingout;
    wait(1000);
    cooking;
    end.

  2. #2
    Join Date
    Mar 2008
    Location
    The Netherlands
    Posts
    1,395
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Redownload SCAR+SRL.


  3. #3
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    u mean i should download scar and srl and install all over again??

  4. #4
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Laur€ns View Post
    Redownload SCAR+SRL.
    I don't think that's it.
    SCAR Code:
    if bankscreen=true then
            writeln('Mission accomplished!!Bank opened');
            wait(500);

    Should be

    SCAR Code:
    if bankscreen=true then
            begin
              writeln('Mission accomplished!!Bank opened');
              wait(500);
            end;

    Access violations are usually due to giving procedures the wrong input, which causes errors if they don't check the input properly.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  5. #5
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have tried what both of u said and nothing changed but here is something whenever i take freedtm away it doesn't do that

  6. #6
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    I don't think that's it.
    SCAR Code:
    if bankscreen=true then
            writeln('Mission accomplished!!Bank opened');
            wait(500);

    Should be

    SCAR Code:
    if bankscreen=true then
            begin
              writeln('Mission accomplished!!Bank opened');
              wait(500);
            end;

    Access violations are usually due to giving procedures the wrong input, which causes errors if they don't check the input properly.
    Idiot

    Answer is:
    SCAR Code:
    procedure LoadDTMS;
        begin
            willowlogs := DTMFromString('78DA63DCC5C0C090C380025C6D25C0342394C' +
           'FB80A48E432A001465435EB80442A01359B814405013547804431' +
           '01358781440611E610720FC8EF65F8D500005AF909E8');
     
            tuna := DTMFromString('78DA637CC2C0C090C3800296CD9E05A619A17' +
           'CC607402283010D30A2AAB903242A08A87901244A08A8790F2432' +
           '09A8790324D208A8B909240A08A8794484398F08FB0B007F1A0DD' +
           '3');
       FreeDTM(willowlogs);
       FreeDTM(tuna);
     
        end;

    Notice how you already free your DTMs after loading them. Once they're freed they cannot be used. So, move those two FreeDTMs to the bottom of your main loop then it'll work
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  7. #7
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Dan's The Man View Post
    Idiot

    Answer is:
    SCAR Code:
    procedure LoadDTMS;
        begin
            willowlogs := DTMFromString('78DA63DCC5C0C090C380025C6D25C0342394C' +
           'FB80A48E432A001465435EB80442A01359B814405013547804431' +
           '01358781440611E610720FC8EF65F8D500005AF909E8');
     
            tuna := DTMFromString('78DA637CC2C0C090C3800296CD9E05A619A17' +
           'CC607402283010D30A2AAB903242A08A87901244A08A8790F2432' +
           '09A8790324D208A8B909240A08A8794484398F08FB0B007F1A0DD' +
           '3');
       FreeDTM(willowlogs);
       FreeDTM(tuna);
     
        end;

    Notice how you already free your DTMs after loading them. Once they're freed they cannot be used. So, move those two FreeDTMs to the bottom of your main loop then it'll work
    What I said about the begin and end had nothing to do with the Access Violation, that is you just mis interpreting my post, I just helped him a bit with the rest of the code.
    My last line was the only one that had to do with the Access Violation.
    Like the DTM he inputs which does not exist. Voila, there is a backup for my explanation.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  8. #8
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thx a lot worked like charm=)

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

    Default

    Also, just a random help, add randomness to your waits!

    SCAR Code:
    Wait(RandomRange(700, 800));
    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

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
  •