Results 1 to 8 of 8

Thread: an error

  1. #1
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    an error

    Hi i'm making a burier, but i always get this error:
    Failed when compiling
    Line 26: [Error] (18119:10): Duplicate identifier 'BANKSCREEN' in script C:\Program Files\SCAR 2.03\includes\srl/srl/core/bank.scar

    I can't find it, plz can you guys look?

    Code:
    {.Script Info:
    # ScriptName  = Ultimate Bone Burier
    # Author      = The Scar Noob
    # Description = A script that withraws bones from bank, buries them, withraws again, ...
    # Version     = 1.0
    # Date        = 14 January 2007
    # Comments    = Fill in const (lines 19-26) and players information
    (lines 29-62)
    /Script Info}
    
    program BoneBurier;
    {.Include SRL/SRL.Scar}
    {.Include SRL/SRL/Skill/Prayer.Scar}
    {.include srl/srl/core/bank.scar}
    
    var
    Burrys, BoneEXP: Integer;
    
    const
    BuryTimes = 50;           // The number of loads you want to bury
    BoneC = 0;                // The bonecolor
    Run = 'N';                // The direction to run when i fight is found
    TypeOfBone = 'bones';     // The type of bone
    pincode = '0000';         // Your pin number
    
    
    // Setup player
    
    Procedure DeclarePlayers;
    begin
         HowManyPlayers:=4;  //Change to the amount of players you use
         NumberOfPlayers(HowManyPlayers);
    
         Players[0].Name     :='';          //Enter your Username here
         Players[0].Pass     :='';          //Enter your Password here
         Players[0].Nick     :='';          //Enter your Nickname here
         Players[0].Skill    :='';         //Skill for genie lamp
         Players[0].Active   := True;
    
    
         Players[1].Name     :='';          //Enter your Username here
         Players[1].Pass     :='';          //Enter your Password here
         Players[1].Nick     :='';         //Enter your Nickname here
         Players[1].Skill    := '';        //Skill for genie lamp
         Players[1].Active   := True;
    
         Players[2].Name     :='';          //Enter your Username here
         Players[2].Pass     :='';          //Enter your Password here
         Players[2].Nick     :='';         //Enter your Nickname here
         Players[2].Skill    := '';       //Skill for genie lamp
         Players[2].Active   := True;
    
         Players[3].Name     :='';          //Enter your Username here
         Players[3].Pass     :='';          //Enter your Password here
         Players[3].Nick     :='';         //Enter your Nickname here
         Players[3].Skill    := '';       //Skill for genie lamp
         Players[3].Active   := True;
    
    
    end;
    
    
    // Setup
    
    procedure Setup;
    begin
    If(Not(Loggedin)) then
    LoginPlayer;
    setChat('hide',1);
    setChat('friends',2);
    setChat('off',3);
    SetRun(True);
    HighestAngle;
    PerfectNorth;
    end;
    
    
    // Randoms
    
    procedure Randoms;
    begin
    If(FindFight) then
    Runawaydirection(Run);
    wait(15000+random(2500));
    RunBack;
    FindMod;
    FindDemon;
    FindMime;
    FindScapeRune;
    SolvePinball;
    Dwarfitem;
    FindName;
    FindTalk;
    SolveBox;
    FindLamp(Players[CurrentPlayer].Skill);
    //SolveFrog;
    FindFrogCave;
    FindNormalRandoms;// For the sandwich lady
    end;
    
    
    // Anti ban
    
    procedure AntiBanActions;
    var
      DBanMe: Integer;
    begin
    DBanMe:= Random(14);
    case DBanMe of
    0: RandomRClickEvery(2 + Random(13));
        1: HoverSkill('Mining', False);
        2: RandomChatEvery(10 + Random(5));
        3: RotateEvery(20 + Random(10));
        4: LeaveScreenEvery(5 + Random(5));
        5: HoverEvery(15 + Random(5), 'Smithing');
        6: PickUpMouse;
        7: BoredEvery(9 + Random(24));
        8: DragItem(1, 1 + Random(18));
        9: GameTab(1 + Random(12));
        10: PolyGlotTalk;
      end;
    end;
    
    
    // Getting the bone exp
    
    procedure GetPrayerEXP;
    begin
    GetPrayerXP(TypeOfBone);
    end;
    
    
    // Burry the bones
    
    Procedure Bury;
    Begin
    if(InvCount = 28) then
    Begin
    repeat
    if(FindObj3(x,y,'ury',BoneC,10))or
    (FindObj3(x,y,'ury',BoneC,15))then
    wait(2000+random(600));
    Mouse(x,y,2,2,True);
    AntiBanActions;
    Randoms;
    Until(Not(FindObj3(x,y,'ury',BoneC,10)))or
    (FindObj3(x,y,'ury',BoneC,15))
    AntiBanActions;
    Randoms;
    Burrys:= Burrys + 1;
    BoneEXP:= BoneXP * 28
     end;
      end;
    
    
    // Opens the bank and withraws the bones
    
    procedure WithrawBones;
    begin
    OpenBank3;
       if(BankScreen = True) then
       begin
       if(PinScreen = True) then
       InPin(pincode);
       FixBank;
       withdraw(1,28,2);
       CloseBank;
    end else
    FixBank;
    Withraw(1, 1,28);
    CloseBank;
    end;
    
    
    // Credits
    
    procedure Credits;
    begin
    ClearDebug
    Writeln('Ultimate Bone Burier by The Scar Noob');
    wait(200);
    Writeln('This script is made by The Scar Noob and is free');
    wait(200);
    Writeln('Check for updates at www.villu-reborn.com');
    wait(200);
    Writeln('Plz post also proggys, bugs and comments over there');
    wait(200);
    Writeln('Thank you for using this bone burier, i hope you love it :-)');
    end;
    
    
    // Report
    
    procedure Report;
    begin
    ClearDebug;
    Writeln('+++++++++++++++ Report +++++++++++++++');
    Writeln('The script is running for: '+TimeRunning);
    Writeln('You have burried a total of '+IntToStr(Burrys)+' loads of '+TypeOfBone+ '[s].');
    Writeln('You have gained '+IntToStr(BoneEXP)+' exp by burying.');
    Writeln('Your prayer lvl is : ' + inttostr(GetSkillLevel('Prayer'))+ 'now');
    end;
    
    
    // Mainloop
    
    begin
    SetUpSRL;
    DeclarePlayers;
    ActivateClient;
    Credits;
    Setup;
    repeat
    WithrawBones;
    Bury;
    until(Burrys = BuryTimes)
    Report;
    Logout;
    NextPlayer(True);
    end.
    i can't look at other possible bugs, because i'm stuck with this one...

    Plz help

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    read the error again

    it says look at line 26 in bank.scar

  3. #3
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I don't get it... i really don't know what to do

  4. #4
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Post your bank.scar

  5. #5
    Join Date
    Jun 2006
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hey i fix up allyour error in your script looks good for a first script i also comment on your errors keep up the good work


    SCAR Code:
    {.Script Info:
    # ScriptName  = Ultimate Bone Burier
    # Author      = The Scar Noob
    # Description = A script that withraws bones from bank, buries them, withraws again, ...
    # Version     = 1.0
    # Date        = 14 January 2007
    # Comments    = Fill in const (lines 19-26) and players information
    (lines 29-62)
    /Script Info}


    program BoneBurier;
    {.Include SRL/SRL.Scar}
    {.Include SRL/SRL/Skill/Prayer.Scar}
    //do not need the bank include that is part of SRL only inlcude stuff like skill an extented

    var
    BoneXP,Burrys, BoneEXP: Integer;// needed to declear BoneXP as an integer

    const
    BuryTimes = 50;           // The number of loads you want to bury
    BoneC = 0;                // The bonecolor
    Run = 'N';                // The direction to run when i fight is found
    TypeOfBone = 'bones';     // The type of bone
    pincode = '0000';         // Your pin number


    // Setup player

    Procedure DeclarePlayers;
    begin
         HowManyPlayers:=4;  //Change to the amount of players you use
         NumberOfPlayers(HowManyPlayers);

         Players[0].Name     :='';          //Enter your Username here
         Players[0].Pass     :='';          //Enter your Password here
         Players[0].Nick     :='';          //Enter your Nickname here
         Players[0].Skill    :='';         //Skill for genie lamp
         Players[0].Active   := True;


         Players[1].Name     :='';          //Enter your Username here
         Players[1].Pass     :='';          //Enter your Password here
         Players[1].Nick     :='';         //Enter your Nickname here
         Players[1].Skill    := '';        //Skill for genie lamp
         Players[1].Active   := True;

         Players[2].Name     :='';          //Enter your Username here
         Players[2].Pass     :='';          //Enter your Password here
         Players[2].Nick     :='';         //Enter your Nickname here
         Players[2].Skill    := '';       //Skill for genie lamp
         Players[2].Active   := True;

         Players[3].Name     :='';          //Enter your Username here
         Players[3].Pass     :='';          //Enter your Password here
         Players[3].Nick     :='';         //Enter your Nickname here
         Players[3].Skill    := '';       //Skill for genie lamp
         Players[3].Active   := True;


    end;


    // Setup

    procedure Setup;
    begin
    If(Not(Loggedin)) then
    LoginPlayer;
    setChat('hide',1);
    setChat('friends',2);
    setChat('off',3);
    SetRun(True);
    HighestAngle;
    PerfectNorth;
    end;


    // Randoms

    procedure Randoms;
    begin
    If(FindFight) then
    Runawaydirection(Run);
    wait(15000+random(2500));
    RunBack;
    FindMod;
    FindDemon;
    FindMime;
    FindScapeRune;
    SolvePinball;
    Dwarfitem;
    FindName;
    FindTalk;
    SolveBox;
    FindLamp(Players[CurrentPlayer].Skill);
    //SolveFrog;

    FindNormalRandoms;// For the sandwich lady{i am pretty sure findnormalrandoms; finds an solve all the randoms so you dont need to say findmime FindTalk etc etc how ever i could be wrong so i will just leave that}
    end;


    // Anti ban

    procedure AntiBanActions;
    var
      DBanMe: Integer;
    begin
    DBanMe:= Random(14);
    case DBanMe of
    0: RandomRClickEvery(2 + Random(13));
        1: HoverSkill('Mining', False);
        2: RandomChatEvery(10 + Random(5));
        3: RotateEvery(20 + Random(10));
        4: LeaveScreenEvery(5 + Random(5));
        5: HoverEvery(15 + Random(5), 'Smithing');
        6: PickUpMouse;
        7: BoredEvery(9 + Random(24));
        8: DragItem(1, 1 + Random(18));
        9: GameTab(1 + Random(12));
        10: PolyGlotTalk;
      end;
    end;


    // Getting the bone exp

    procedure GetPrayerEXP;
    begin
    GetPrayerXP(TypeOfBone);
    end;


    // Burry the bones

    Procedure Bury;
    Begin
    if(InvCount = 28) then
    Begin
    repeat
    if(FindObj3(x,y,'ury',BoneC,10))or
    (FindObj3(x,y,'ury',BoneC,15))then
    wait(2000+random(600));
    Mouse(x,y,2,2,True);
    AntiBanActions;
    Randoms;
    Until(Not(FindObj3(x,y,'ury',BoneC,10)))or
    (FindObj3(x,y,'ury',BoneC,15))
    AntiBanActions;
    Randoms;
    Burrys:= Burrys + 1;
    BoneEXP:= BoneXP * 28;//didnt have a semicolon an didnt declear BoneXP as a interger
     end;
      end;


    // Opens the bank and withraws the bones

    procedure WithrawBones;
    begin
    OpenBank3;
       if(BankScreen = True) then
       begin
       if(PinScreen = True) then
       InPin(pincode);
       FixBank;
       withdraw(1,28,2);
       CloseBank;
    end else
    FixBank;
    Withdraw(1, 1,28);//spelt withdraw wrong
    CloseBank;
    end;


    // Credits

    procedure Credits;
    begin
    ClearDebug
    Writeln('Ultimate Bone Burier by The Scar Noob');
    wait(200);
    Writeln('This script is made by The Scar Noob and is free');
    wait(200);
    Writeln('Check for updates at www.villu-reborn.com');
    wait(200);
    Writeln('Plz post also proggys, bugs and comments over there');
    wait(200);
    Writeln('Thank you for using this bone burier, i hope you love it :-)');
    end;


    // Report

    procedure Report;
    begin
    ClearDebug;
    Writeln('+++++++++++++++ Report +++++++++++++++');
    Writeln('The script is running for: '+TimeRunning);
    Writeln('You have burried a total of '+IntToStr(Burrys)+' loads of '+TypeOfBone+ '[s].');
    Writeln('You have gained '+IntToStr(BoneEXP)+' exp by burying.');
    Writeln('Your prayer lvl is : ' + inttostr(GetSkillLevel('Prayer'))+ 'now');
    end;


    // Mainloop

    begin
    SetUpSRL;
    DeclarePlayers;
    ActivateClient;
    Credits;
    Setup;
    repeat
    WithrawBones;
    Bury;
    until(Burrys = BuryTimes)
    Report;
    Logout;
    NextPlayer(True);
    end.

  6. #6
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    {.Include SRL/SRL.Scar}
    {.Include SRL/SRL/Skill/Prayer.Scar}
    {.include srl/srl/core/bank.scar}


    if it's in core you dont need to include it, because {.Include SRL/SRL.Scar} includes all cores

  7. #7
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    oh boreas! omg this was the answer i needed! Thank you very much!!! I didn't knew that, now i do

    Thanks! You guys rulezzz!

    Also thank you scarscaper4life for the info just like boreas did

  8. #8
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    oh boreas! omg this was the answer i needed! Thank you very much!!! I didn't knew that, now i do

    Thanks! You guys rulezzz!

    Also thank you scarscaper4life for the info

    PS sorry for the double post, pc = flipping

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Line 135: [Error] (14845:1): Syntax error in script
    By AbsTrACt'^.| in forum OSR Help
    Replies: 16
    Last Post: 05-23-2008, 01:14 PM
  2. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  3. Smart error and Some kind of Math.scar error
    By FagetHax0r in forum OSR Help
    Replies: 6
    Last Post: 02-24-2008, 10:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •