Results 1 to 2 of 2

Thread: Getting runtime Error?

  1. #1
    Join Date
    Feb 2008
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Getting runtime Error?

    ///////////\\\\\\\\\\\\
    ////////////\\\\\\\\\\\\\
    //Oober Iron Power Miner\\\
    ////////Instructions\\\\\\\\\
    /////1.Set-up Player at Rocks\\
    ///////2.Have Pickaxe Equipted\\\
    //////////3. Click Run and Enjoy\\\
    //////////////////\\\\\\\\\\\\\\\\\\\
    program powerminer;

    {.include SRL/SRL.scar}
    var tx,ty,IronRock: integer;
    var xy,yx,IronOre: integer;



    Procedure DeclarePlayers; // this procedure is used to logg players in
    begin
    HowManyPlayers :=1; // Set Number of Players here.
    NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
    CurrentPlayer:=0; // CurrentPlayer = Array Index

    Players[0].Name :='';//Username
    Players[0].Pass :='';//Password
    Players[0].Nick :='';//3-4 Letters from your username NOT THE FIRST
    Players[0].Active:=True;//Autoing? True/False


    end;
    ////////////////////////////////////////////////////////////////////////////////

    procedure LoadDTMs;
    begin
    IronOre := DTMFromString('78DA6314616060E06740011EBA0A0C5C409 A1' +
    '188FF0301A3009021CD801530C26876202148408D1C901043 9755' +
    '4055230F24B8B09B0057230E245809A801F9898D801A4E20C 18D5' +
    'F0D006EB005D8');

    IronRock := DTMFromString('78DA6394656060106640014E1A720CFC409 A1' +
    '188FF0301232B90218AAA26DC54034C3342F98C1240420655 8DA5' +
    '9214AA1A1E4C35DE7A4AA86A4016B3A2AA0936564355C3072 4385' +
    '1D5F81BA8A0AA01F98B0F558DADAA0C8A1A000907092F');

    end;

    Procedure Randoms;
    Begin
    FindTalk;
    FindNormalRandoms;
    SolveChatRandom;
    FindLamp('Mining');
    SolvePinball;
    DwarfItem;
    If(FindFight)Then
    Begin
    MakeCompass('N');
    RunTo('E', True);
    Wait(7000 +Random(3000));
    RunTo('W', True);
    End;
    End;


    procedure AntiBan;
    begin
    case random(100) of //do a random number so it won't always perform the antiban
    0: RandomRClick;
    1: BoredHuman;
    2: HoverSkill('Mining', False);
    3: AlmostLogout;
    end;
    end;

    Procedure MineIron;
    var
    Tx, Ty, IronRock: integer;
    begin
    If Not Loggedin then Exit;
    LoadDTMs;
    IronRock := DTMFromString('78DA6394656060106640014E1A720CFC409 A1' +
    '188FF0301232B90218AAA26DC54034C3342F98C1240420655 8DA5' +
    '9214AA1A1E4C35DE7A4AA86A4016B3A2AA0936564355C3072 4385' +
    '1D5F81BA8A0AA01F98B0F558DADAA0C8A1A000907092F');
    If not InvFull then begin
    repeat
    If Not Loggedin then Exit;
    if FindObjCustom(tx,ty, ['Min', 'ine'], [IronRock], 7) then
    begin

    Mouse(tx,ty,0,0,false);
    Wait(500+(random(150)));

    ChooseOption('ine')
    randoms
    antiban;
    writeln('found rock');

    end else
    writeln('couldnt find rock');
    randoms;
    antiban;
    antiban;
    antiban;

    until( InvFull )
    end;
    end;

    procedure drop;
    begin
    if(FindDTM(IronOre, xy, yx, 550, 210, 730, 462)) then
    begin
    Mouse(tx,ty,5,5,False);
    ChooseOption('rop');
    end;
    end;


    begin
    SetupSRL;
    LoadDTMs;
    DeclarePlayers;
    LoginPlayer;
    repeat
    mineiron;
    drop;
    until(IsFKeyDown(3));
    FreeDTM(IronOre);
    FreeDTM(IronRock);
    End.


    Can someone fix?
    "Our youth are not failing the system; the system is failing our youth. Ironically, the very youth who are being treated the worst are the young people who are going to lead us out of this nightmare." - Rachel Jackson

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

    Default

    Here's a Fix:

    SCAR Code:
    ///////////\\\\\\\\\\\\
    ////////////\\\\\\\\\\\\\
    //Oober Iron Power Miner\\\
    ////////Instructions\\\\\\\\\
    /////1.Set-up Player at Rocks\\
    ///////2.Have Pickaxe Equipted\\\
    //////////3. Click Run and Enjoy\\\
    //////////////////\\\\\\\\\\\\\\\\\\\
    program powerminer;

    {.include SRL/SRL.scar}
    var tx,ty,IronRock: integer;
    var xy,yx,IronOre: integer;



    Procedure DeclarePlayers; // this procedure is used to logg players in
    begin
    HowManyPlayers :=1; // Set Number of Players here.
    NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
    CurrentPlayer:=0; // CurrentPlayer = Array Index

    Players[0].Name :='';//Username
    Players[0].Pass :='';//Password
    Players[0].Nick :='';//3-4 Letters from your username NOT THE FIRST
    Players[0].Active:=True;//Autoing? True/False


    end;
    ////////////////////////////////////////////////////////////////////////////////

    procedure LoadDTMs;
    begin
    IronOre := DTMFromString('78DA6314616060E06740011EBA0A0C5C409A1' +
    '188FF0301A3009021CD801530C26876202148408D1C9010439755' +
    '4055230F24B8B09B0057230E245809A801F9898D801A4E20C18D5' +
    'F0D006EB005D8');

    IronRock := DTMFromString('78DA6394656060106640014E1A720CFC409A1' +
    '188FF0301232B90218AAA26DC54034C3342F98C12404206558DA5' +
    '9214AA1A1E4C35DE7A4AA86A4016B3A2AA0936564355C30724385' +
    '1D5F81BA8A0AA01F98B0F558DADAA0C8A1A000907092F');

    end;

    Procedure Randoms;
    Begin
    FindTalk;
    FindNormalRandoms;
    SolveChatRandom;
    FindLamp('Mining');
    SolvePinball;
    DwarfItem;
    If(FindFight)Then
    Begin
    MakeCompass('N');
    RunTo('E', True);
    Wait(7000 +Random(3000));
    RunTo('W', True);
    End;
    End;


    procedure AntiBan;
    begin
    case random(100) of //do a random number so it won't always perform the antiban
    0: RandomRClick;
    1: BoredHuman;
    2: HoverSkill('Mining', False);
    3: AlmostLogout;
    end;
    end;

    Procedure MineIron;
    var
    Tx, Ty, IronRock: integer;
    begin
    If Not Loggedin then Exit;
    LoadDTMs;
    IronRock := DTMFromString('78DA6394656060106640014E1A720CFC409 A1' +
    '188FF0301232B90218AAA26DC54034C3342F98C1240420655 8DA5' +
    '9214AA1A1E4C35DE7A4AA86A4016B3A2AA0936564355C3072 4385' +
    '1D5F81BA8A0AA01F98B0F558DADAA0C8A1A000907092F');
    If not InvFull then begin
    repeat
    If Not Loggedin then Exit;
    if FindObjCustom(tx,ty, ['Min', 'ine'], [IronRock], 7) then
    begin

    Mouse(tx,ty,0,0,false);
    Wait(500+(random(150)));

    ChooseOption('ine')
    randoms
    antiban;
    writeln('found rock');

    end else
    writeln('couldnt find rock');
    randoms;
    antiban;
    antiban;
    antiban;

    until( InvFull )
    end;
    end;

    procedure drop;
    begin
    if(FindDTM(IronOre, xy, yx, 550, 210, 730, 462)) then
    begin
    Mouse(tx,ty,5,5,False);
    ChooseOption('rop');
    end;
    end;


    begin
    SetupSRL;
    LoadDTMs;
    DeclarePlayers;
    LoginPlayer;
    repeat
    mineiron;
    drop;
    until(IsFKeyDown(3));
    FreeDTM(IronOre);
    FreeDTM(IronRock);
    End.

    What I did:

    1. I got rid of the spaces in your DTM code, DTM strings cannot have spaces in them

    Hope I Helped

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
  •