Results 1 to 5 of 5

Thread: errors in powerminer

  1. #1
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default errors in powerminer

    hi everyone, my first script, a powerminer.. is almost done..
    but when it compiles.. it gives errors
    Code:
    [Runtime Error] : Exception: Type Mismatch in line 273
    and sometimes in players.scar
    Code:
    [Runtime Error] : Exception: Canvas does not allow drawing in line 95 in script
    if you help me, you get rep++ and credits in my script

    this is my script:
    SCAR Code:
    program TinTerror;
            {.include SRL\SRL.scar}
            {.include SRL\SRL\Skill\Mining.scar}
    /////////////////////////////////////////////////////////////////////
    //                 HOW TO USE                                      //
    //      1.Setup your players near Tin                              //
    //      2.Fill in your SRLStatsID and SRLStatsPassword             //
    //      3.Fill in RunDirection                                     //
    //      4.Fill in Loads                                            //
    //      5.Fill in DeclarePlayers                                   //
    //      6.Hit start and have fun ^_^                               //
    /////////////////////////////////////////////////////////////////////

            {credits:
            NaumanAkhlaQ for fixing an error, updating standards and making the script
            look amazing!!!!! Thanks a lot Naum!!!!!
            Runescapian321 for fixing an error!
            Torrent of Flame for fixing a mainloop error!}



            const
              SRLStatsID = ''; // 4 digit number which records autoing things
                                    // get one at [url]http://stats.srl-forums.com[/url]
              SRLStatsPassword = ''; // your SRLStatsID Password
              RunDirection = 'N'; //N = North, E = East, S = South, W = West
                                  //this is the direction to run, if your in a fight
              tincolor = 10132390; // do NOT touch this, only change this if the normal number doesn't work

              Loads = 2; //how many loads to drop?

            var x, y, oresmined, loadsb, waits: integer;
              TinOreDTM: integer;

            procedure LoadDTM;
            begin
              TinOreDTM := DTMFromString('78DA6394666060106240010D15E50CFF81342' +
                '310FF07024671208395010D30C2D580798A40828D801A55202145' +
                '408D18905020A0861B4888E2570300D39F0C7C');
            end;

            procedure DeclarePlayers;
            // you can add more if you want... make sure you change players[0] to
            // players [1] etc.
            // don't forget to change HowManyPlayers to the total amount of players!
            begin
              HowManyPlayers := 1;
              NumberOfPlayers(HowManyPlayers);
              CurrentPlayer := 0;

              Players[0].Name := ''; //your runescape account
              Players[0].Pass := ''; // your runescape password of your account
              Players[0].Nick := ''; //3 or 4 letters of the name, used for finding randoms
                                       //zezima would be ezi for example
              Players[0].Active := True; //do you want this account to auto? true = yes, false = no
            end;

            {----------------------------------}
            { Search Antiban! by NaumanAkhlaQ  }
            {----------------------------------}

            procedure Search;
            var
              f, e : integer;
            begin
             If (not (Loggedin)) then
              Exit;
              MMouse(645, -15, 1, 1)
              MMouse(727, -9, 1, 1)
              e := 5 + Random(6);   //Of Almost Logout credits to Yakman :)
              for f := 0 to e do
              begin
                case Random(3) of
                  0, 1: MMouse(727 - Random(200), 90 + Random(200), 0, 0);
                  2: IdleTime(300 + Random(300), 500, 0.5);
                end;
              FTwait(2 + Random(1));
              end;
            end;

            procedure DontGetBanned;
            begin
              if not LoggedIn then
                Exit;
              case Random(15) of
                1: HoverSkill('Mining', False);
                2: HoverSkill('Random', False);
                3:
                  begin
                    GameTab(1 + Random(12));
                    wait(800 + random(500));
                    GameTab(4)
                  end;
                4: BoredHuman;
                5: AlmostLogout;
                6: DoEmote(400 + Random(90));
                7: Search;
              end;
            end;

            Procedure FindFightEx;
            Begin
             If(FindFight) then
               Begin
                 Writeln('Our player is being attacked!')
                 Writeln('Lets run away!')
               Begin
                 WriteLn('Running....')
                 RunAway(RunDirection,False,1,8000+Random(3000))
                 WriteLn('Successfully ran away from fight!')
               end;
             end;
            end;

            Procedure AntiRandoms;
            var
            i : Integer;
            Begin
             for i := 0 to 3 do
               FindNormalRandoms;
               FindFightEx;
               FindNonInventoryRandoms;
             wait(1)
            end;

            procedure WaitWhileMine;
            var
              Mark: Integer;
            begin
              MarkTime(Mark)
                repeat
                AntiRandoms;
                DontGetBanned;
                wait(900 + Random(200));
              until (FindBlackChatMessage('You manage to mine some')) or (TimeFromMark(mark) > 20000)
            end;

            procedure MineTheTin;
            begin
              if not LoggedIn then
                Exit;
              if (not (FindObjCustom(x, y, ['ine'], [tincolor], 7))) then
                Wait(350 + random(250));
              Waits := Waits + 1;
              if (Waits = 10) then
              begin
                writeln('We could not find the Tin');
                writeln('Next player');
                writeln('If this player cannot find the Tin too');
                writeln('change the tincolor and post it on my tread please');
                nextplayer(false);
                Exit;
              end else
                if FindObjCustom(x, y, ['ine'], [tincolor], 7) then
                  repeat
                    case (Random(5)) of
                      0: Mouse(x, y, 4, 4, True);
                      1: Mouse(x, y, 0, 0, True);
                      2: Mouse(x, y, 1, 1, True);
                      3: Mouse(x, y, 2, 2, True);
                      4: Mouse(x, y, 3, 3, True);
                    end;
                    WaitWhileMine;
                until (InvFull);
              If (InvFull) then
               Begin
                OresMined := OresMined + 27;
                WriteLn(' Mined 27 ores! ');
                end;
            end;

            procedure DropTheTinOre;
            begin
              if not LoggedIn then
                Exit;
              if InvFull then
                Loadsb := loadsb + 1;
              begin
                if FindDTM(TinOreDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
                begin
                  case (Random(5)) of
                    0: MMouse(x, y, 4, 4);
                    1: MMouse(x, y, 0, 0);
                    2: MMouse(x, y, 1, 1);
                    3: MMouse(x, y, 2, 2);
                    4: MMouse(x, y, 3, 3);
                  end;
                  begin
                    if Isuptext('in or') then
                    begin
                      case (Random(5)) of
                        0: begin
                            Wait(150 + random(50));
                            Mouse(x, y, 4, 4, False);
                            ChooseOption('rop');
                          end;
                        1:
                          begin
                            Wait(150 + random(50));
                            Mouse(x, y, 0, 0, False);
                            ChooseOption('rop');
                          end;
                        2:
                          begin
                            Wait(150 + random(50));
                            Mouse(x, y, 1, 1, False);
                            ChooseOption('rop');
                          end;
                        3:
                          begin
                            Wait(150 + random(50));
                            Mouse(x, y, 2, 2, False);
                            ChooseOption('rop');
                          end;
                        4:
                          begin
                            Wait(150 + random(50));
                            Mouse(x, y, 3, 3, False);
                            ChooseOption('rop');
                          end;
                      end;
                    end else
                    begin
                      Writeln('No Tin Ore found');
                      Writeln('Next Player');
                      Writeln('Please post this on my tread');
                      nextplayer(false);
                    end;
                    ReportVars[0]:=1;
                ReportVars[1]:= 27;
                {ReportVars[2]:= ;  }
                SrlRandomsReport;
                SendSRLReport;
                  end;
                end;
              end;
            end;

            Procedure Proggie;
            Begin
              SRLRandomsReport;
              WriteLn(' |+++++++++++++++++++++++++++++++++++++++++++++  ')
              WriteLn(' | Ores Mined := '+IntToStr(OresMined)+' Ores! | ')
              WriteLn(' |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~          | ')
              WriteLn(' | Loads Dropped := '+IntToStr(LoadsB)+' !     | ')
              WriteLn(' |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~          | ')
              WriteLn(' | Ran For := ' +TimeRunning);
              WriteLn(' |+++++++++++++++++++++++++++++++++++++++++++++  ')
            end;
           
            procedure credits;
            begin
            cleardebug;
            writeln(' |+++++++++++++++++++++++++++++++++++++++++++++++| ');
            writeln(' | CREDITS:                                      | ');
            writeln(' | NaumanAkhlaQ for fixing an error,             | ');
            writeln(' | updating standards and making the script      | ');
            writeln(' | look amazing!!!!! Thanks a lot Naum!!!!       | ');
            writeln(' | Runescapian321 for fixing an error!           | ');
            writeln(' | Torrent of Flame for fixing a mainloop error! | ');
            writeln(' |+++++++++++++++++++++++++++++++++++++++++++++++| ');
            wait(2000 + random(1000));
            end;

            procedure siggy;
            begin
            cleardebug;
            writeln(' |+++++++++++++++++++++++++++|');
            writeln(' |                           |');
            writeln(' |   -------   |   |\    |   |');
            writeln(' |      |      |   | \   |   |');
            writeln(' |      |      |   |  \  |   |');
            writeln(' |      |      |   |   \ |   |');
            writeln(' |      |      |   |    \|   |');
            writeln(' |           TERROR          |');
            writeln(' |                           |');
            writeln(' |+++++++++++++++++++++++++++|');
            wait(1000 + random(500));
            cleardebug;
            writeln(' |+++++++++++++++++++++++++++|');
            writeln(' |                           |');
            writeln(' |                           |');
            writeln(' | The first script from PvH |');
            writeln(' |     Special thanks to     |');
            writeln(' |                           |');
            writeln(' |        NaumanAkhlaQ       |');
            writeln(' |       Runescapian321      |');
            writeln(' |      Torrent of Flame     |');
            writeln(' |                           |');
            writeln(' |+++++++++++++++++++++++++++|');
            wait(1000 + random(500));
            cleardebug;
            writeln(' |+++++++++++++++++++++++++++|');
            writeln(' |                           |');
            writeln(' |          remember         |');
            writeln(' |    Please post proggies   |');
            writeln(' |          and bugs         |');
            writeln(' | on my tread at srl-forums |');
            writeln(' |                           |');
            writeln(' |+++++++++++++++++++++++++++|');
            wait(2000 + random(1000));
            end;
           
            procedure srlstats;
            begin;
            cleardebug;
               SetupSRL;
              ScriptID := '768';
              if ((SRLStatsID = '') or (SRLStatsPassword = ''))then
              begin
                SRLID:='4902';
                SRLPassword:='leechme';
                writeln('please do NOT leech!');
                writeln('go to [url]http://stats.srl-forums.com[/url] and create an account');
                writeln('script is started now');
              end else
              begin
                SRLID := SRLStatsID;
                SRLPassword := SRLStatsPassword;
              end;
            end;

    procedure mainloop;
    begin;
    credits;
    siggy;
    srlstats;
    activateclient;
      DeclarePlayers;
      SetAngle(true);
      MakeCompass('N');
      LoadDTM;
      begin
        repeat;
          MineTheTin;
          Proggie;
          DropTheTinOre;
          Proggie;
        until (LoadsB mod Loads < 0.00000001)
      end;
    end;

    begin
      mainloop;
    end.

    thanks a lot

  2. #2
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Well, I've looked through it and it seems fine. And I just compiled and it does what is needed, but I'm just gonna test it to see if its when the script is runing.

    Well, I've now got a runtime error further on than you with your mod bit, I've never used that before so I'll see what I can do to sort it.

    Right, well I changed the 4th to last line to Until(Loadsb >= Loads); and then it seemed to work.

  3. #3
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Dude Richard View Post
    Well, I've looked through it and it seems fine. And I just compiled and it does what is needed, but I'm just gonna test it to see if its when the script is runing.
    well... thanks for replying
    but when i compile i always get that errors..
    does this have to do with my srl or do you have any idea what is the problem?
    problem is.. i cant test it this way by my own

    edit:
    NaumanAkhlaQ said that i had to do that...
    i changed it now..
    my srl is broken in scar
    i used the other one and it worked..
    thanks a lot!

  4. #4
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Np, don't forget to rep me

  5. #5
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i already repped you
    and credited in script^^
    i always keep my promise

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help with 3 errors
    By haxor62 in forum Java Help and Tutorials
    Replies: 2
    Last Post: 07-27-2008, 01:53 PM
  2. need help with errors....
    By Team_epic in forum OSR Help
    Replies: 16
    Last Post: 06-18-2007, 03:24 PM
  3. Errors?
    By 3Garrett3 in forum OSR Help
    Replies: 2
    Last Post: 03-02-2007, 08:01 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
  •