Results 1 to 13 of 13

Thread: Need Help with Antirandoms and Type mismatch

  1. #1
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Need Help with Antirandoms and Type mismatch

    I am using scar divi 3.11 with srl 3.8
    this is my script so far

    SCAR Code:
    program OakCutterBanker;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/skill/WoodCutting.scar}
    const
    OakColor= 0; //color of oak
    Pinumber= 0000; //your pin number if any

    procedure Bankpin;
    begin
     If PinScreen then
       begin
        InPin(Pinumber);
       end;
     else
     wait(500);
    end;

    procedure SuperAntiBan;
    begin
     randomrclickevery(5+ random(3))
     hoverevery(5+ random(5))
     PickUpMouseEvery(10+random(10)
     LeaveScreenEvery(20+random(15)
    end;

    procedure AntiRandoms
     begin
     FindNormalRandoms: True;
     end;

    begin
    setupSRL
    end.

    when I compile I get this
    Line 12: [Error] (14826:16): Type mismatch in script C:\Program Files\SCAR 3.11\Scripts\OakCutter.scar

    Also, with how I have the antirandoms procedure, will it work once in the main loop?

  2. #2
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    the pin number needs to be a string..
    Code:
    Pinumber = '0000';
    Like that.

    And here is the completely fixed version.. This will first execute your anti-ban procedure, and then it will check for the pinscreen and if it finds it, it will enter the pin..
    Code:
    program OakCutterBanker;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/skill/WoodCutting.scar}
    {.include SRL\SRL\Extended\xAntiBan.scar}
    const
    OakColor= 0; //color of oak
    Pinumber= '0000'; //your pin number if any
    
    procedure Bankpin;
    begin
     If PinScreen then
       begin
        InPin(Pinumber);
       end
     else
     wait(500);
    end;
    
    procedure SuperAntiBan;
    begin
     randomrclickevery(5+ random(3));
     hoverevery(5+random(5), 'Woodcutting');
     PickUpMouseEvery(10+ random(10));
     LeaveScreenEvery(20+random(15));
    end;
    
    procedure AntiRandoms;
    begin
      FindNormalRandoms;
    end;
    
    begin
     SetupSRL;
     SuperAntiBan;
     BankPin;
    end.

  3. #3
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You had to make Pin a string and end else; begin

    SCAR Code:
    const
    OakColor= 0; //color of oak
    Pinumber= '0000'; //your pin number if any //Changed to string

    procedure Bankpin;
    begin
     If PinScreen then
       begin
        InPin(Pinumber);
       end else; //Changed this
       begin
         wait(500);
       end;
    end;

    Hope this helps,
    ~Stupedspam

    Edit: Little too slow...

  4. #4
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks guys

  5. #5
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by stupedspam View Post
    You had to make Pin a string and end else; begin



    Edit: Little too slow...
    It's ok, you were still pretty fast. You didnt fail completely

  6. #6
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    itschris917

    when i compile, it brings me to a tab with the antiban srl

    it says

    Line 234: [Error] (15053:5): Unknown identifier 'PolyGlotTalk' in script C:\Program Files\SCAR 3.11\includes\SRL\SRL\Extended\xAntiBan.scar

  7. #7
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Got to XAntiBan and Change this:
    SCAR Code:
    procedure DontBanMe(mins: Integer);
    var
      DBanMe: Integer;
    begin
      if ((TimeFromMark(PickUpMouseMark) / 1000) / 60 >= mins) then
        DBanMe := Random(12); (*1 over so it will do nothing sometimes*)
      case DBanMe of
        0: RandomRClickEvery(2 + Random(13));
        1: HoverSkill('random', False);
        2: RotateEvery(20 + Random(10));
        3: LeaveScreenEvery(5 + Random(5));
        4: HoverEvery(15 + Random(5), 'random');
        5: PickUpMouse;
        6: BoredEvery(9 + Random(24));
        7: DragItem(1, 1 + Random(18));
        8: GameTab(1 + Random(12));
        9: DoEmote(1 + Random(20));
        10: PolyGlotTalk;
      end;
    end;

    To this:
    SCAR Code:
    procedure DontBanMe(mins: Integer);
    var
      DBanMe: Integer;
    begin
      if ((TimeFromMark(PickUpMouseMark) / 1000) / 60 >= mins) then
        DBanMe := Random(11); (*1 over so it will do nothing sometimes*)
      case DBanMe of   // changed 12 to 11
        0: RandomRClickEvery(2 + Random(13));
        1: HoverSkill('random', False);
        2: RotateEvery(20 + Random(10));
        3: LeaveScreenEvery(5 + Random(5));
        4: HoverEvery(15 + Random(5), 'random');
        5: PickUpMouse;
        6: BoredEvery(9 + Random(24));
        7: DragItem(1, 1 + Random(18));
        8: GameTab(1 + Random(12));
        9: DoEmote(1 + Random(20));
      end; //Took out PolyGlotTalk
    end;

    PolyGlotTalk isn't in the script so just remove it and save

    ~Stupedspam

  8. #8
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh yea, thats right, i forgot they took that out.. It compiled on my computer, because i already took it out

  9. #9
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks

  10. #10
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i got same error, on a different script i am...beginning

    SCAR Code:
    //////////////////////Draynor Lumberjack\\\\\\\\\\\\\\\\\\\\\\\
    /////////////////////////By Macrosoft\\\\\\\\\\\\\\\\\\\\\\\\\\
    ///////////////////Version 0.1 - First Script\\\\\\\\\\\\\\\\\\

    program DraynorLumberjack;
     {.include SRL/SRL.scar}
     {.include SRL/SRL/skill/WoodCutting.scar}
    var
     fish: integer;
     bank: integer;
    const
     //set these, you only need to set the colors for the trees you are using.
     //If using Bestree setting, set all the colors
     //You must set TreeToChop if not using Bestree.
     //You must use Bestree if not setting TreeToChop.
     WillowColor1= 0;       //pick one color on the willow trees
     WillowColor2= 0;       //pick another willow color
     OakColor1= 0;          //pick a color any color (on the oak trees)
     OakColor2= 0;          //pick another oak color
     TreeColor1= 0;         //Pick a color on the normal trees
     TreeColor2= 0;         //Pick another color on the normal trees
     Bestree= True;         //Write "True" if you want to chop the best tree you can cut for your level



    procedure PlayerSetup;
     begin
         HowManyPlayers :=6;
         NumberOfPlayers(HowManyPlayers);
         CurrentPlayer:=0;

         Players[0].Name :='yourname';
         Players[0].Pass :='yourpass';
         Players[0].Nick :='urna'; //3 to 4 letters of your username, DO NOT INCLUDE THE FIRST LETTER!
         Players[0].Pin :='0000'; //pin number if any
         Players[0].TreeToChop:='Willows'; //Write Willows Oaks or Trees (What tree kind are you chopping?) Dont set if using Bestree
         Players[0].Bestree:=False; //Write "True" if you want to chop the best tree you can cut for your level
         Players[0].Active:=True; //Are you using this player?

         Players[1].Name :='yourname';
         Players[1].Pass :='yourpass';
         Players[1].Nick :='urna'; //3 to 4 letters of your username, DO NOT INCLUDE THE FIRST LETTER!
         Players[1].Pin :='0000'; //pin number if any
         Players[1].TreeToChop:=''; //Write Willows Oaks or Trees (What tree kind are you chopping?) Dont set if using Bestree
         Players[1].Bestree:=False; //Write "True" if you want to chop the best tree you can cut for your level
         Players[1].Active:=True; //Are you using this player?

         Players[2].Name :='yourname';
         Players[2].Pass :='yourpass';
         Players[2].Nick :='urna'; //3 to 4 letters of your username, DO NOT INCLUDE THE FIRST LETTER!
         Players[2].Pin :='0000'; //pin number if any
         Players[2].TreeToChop:=''; //Write Willows Oaks or Trees (What tree kind are you chopping?) Dont set if using Bestree
         Players[2].Bestree:=False; //Write "True" if you want to chop the best tree you can cut for your level
         Players[2].Active:=True; //Are you using this player?

         Players[3].Name :='yourname';
         Players[3].Pass :='yourpass';
         Players[3].Nick :='urna'; //3 to 4 letters of your username, DO NOT INCLUDE THE FIRST LETTER!
         Players[3].Pin :='0000'; //pin number if any
         Players[3].TreeToChop:=''; //Write Willows Oaks or Trees (What tree kind are you chopping?) Dont set if using Bestree
         Players[3].Bestree:=False; //Write "True" if you want to chop the best tree you can cut for your level
         Players[3].Active:=True; //Are you using this player?

         Players[4].Name :='yourname';
         Players[4].Pass :='yourpass';
         Players[4].Nick :='urna'; //3 to 4 letters of your username, DO NOT INCLUDE THE FIRST LETTER!
         Players[4].Pin :='0000'; //pin number if any
         Players[4].TreeToChop:=''; //Write Willows Oaks or Trees (What tree kind are you chopping?) Dont set if using Bestree
         Players[4].Bestree:=False; //Write "True" if you want to chop the best tree you can cut for your level
         Players[4].Active:=True; //Are you using this player?

         Players[5].Name :='yourname';
         Players[5].Pass :='yourpass';
         Players[5].Nick :='urna'; //3 to 4 letters of your username, DO NOT INCLUDE THE FIRST LETTER!
         Players[5].Pin :='0000'; //pin number if any
         Players[5].TreeToChop:=''; //Write Willows Oaks or Trees (What tree kind are you chopping?) Dont set if using Bestree
         Players[5].Bestree:=False; //Write "True" if you want to chop the best tree you can cut for your level
         Players[5].Active:=True; //Are you using this player?
      end;

    procedure Sig;
     begin
      ClearDebug;
      Writeln('     ___           ___           ___           ___           ___     ');
      Writeln('    /__/\         /  /\         /  /\         /  /\         /  /\    ');
      Writeln('   |  |::\       /  /::\       /  /:/        /  /::\       /  /::\   ');
      Writeln('   |  |:|:\     /  /:/\:\     /  /:/        /  /:/\:\     /  /:/\:\  ');
      Writeln(' __|__|:|\:\   /  /:/~/::\   /  /:/  ___   /  /:/~/:/    /  /:/  \:\ ');
      Writeln('/__/::::| \:\ /__/:/ /:/\:\ /__/:/  /  /\ /__/:/ /:/___ /__/:/ \__\:\');
      Writeln('\  \:\~~\__\/ \  \:\/:/__\/ \  \:\ /  /:/ \  \:\/:::::/ \  \:\ /  /:/');
      Writeln(' \  \:\        \  \::/       \  \:\  /:/   \  \::/~~~~   \  \:\  /:/ ');
      Writeln('  \  \:\        \  \:\        \  \:\/:/     \  \:\        \  \:\/:/  ');
      Writeln('   \  \:\        \  \:\        \  \::/       \  \:\        \  \::/   ');
      Writeln('    \__\/         \__\/         \__\/         \__\/         \__\/    ');
      Writeln('             ___           ___           ___                         ');
      Writeln('            /  /\         /  /\         /  /\        ___             ');
      Writeln('           /  /:/_       /  /::\       /  /:/_      /  /\            ');
      Writeln('          /  /:/ /\     /  /:/\:\     /  /:/ /\    /  /:/            ');
      Writeln('         /  /:/ /::\   /  /:/  \:\   /  /:/ /:/   /  /:/             ');
      Writeln('        /__/:/ /:/\:\ /__/:/ \__\:\ /__/:/ /:/   /  /::\             ');
      Writeln('        \  \:\/:/~/:/ \  \:\ /  /:/ \  \:\/:/   /__/:/\:\            ');
      Writeln('         \  \::/ /:/   \  \:\  /:/   \  \::/    \__\/  \:\           ');
      Writeln('          \__\/ /:/     \  \:\/:/     \  \:\         \  \:\          ');
      Writeln('            /__/:/       \  \::/       \  \:\         \__\/          ');
      Writeln('            \__\/         \__\/         \__\/                        ');
      wait(3000 + random(750));
    end;
    procedure Login;
     begin
     If findloginscreen: true;
     then

    end;
    begin
     SetupSRL
     Sig

    end.

    Line 35: [Error] (14849:24): Type mismatch in script C:\Program Files\SCAR 3.11\Scripts\DraynorLumberjack.scar

  11. #11
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There are specific Srl Player arrays and Players[1].Pin, Players[1].TreeToChop, and Players[1].Bestree are not part of them.

    Here are all of the ones I can think of...

    Players[1].location
    Players[1].skill
    Players[1].boolean1
    Players[1].boolean2
    Players[1].boolean3
    Players[1].integer1
    Players[1].integer2
    Players[1].integer3
    Players[1].integer4
    Players[1].string1
    Players[1].string2
    Players[1].string3

    Basically use one of these instead of the ones you have...

    Hope this helps,
    ~Stupedspam

  12. #12
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Wrong

    SCAR Code:
    If (FindColor(3342423, x, y....)) Then
     begin;
      DooS0m3w4ck st00f;
     end else
      Something;

    works.

    Oh, but nice script try anyway =)
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  13. #13
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh, i understand now, so it needs to be boolean1 etc

    Iv always wondered why people used such boring names...lol

    thanks for the help

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Type Mismatch?
    By Runaway in forum OSR Help
    Replies: 5
    Last Post: 03-09-2009, 07:30 AM
  2. type mismatch
    By drizzt in forum OSR Help
    Replies: 2
    Last Post: 02-16-2008, 03:19 PM
  3. type mismatch
    By Maxcore in forum OSR Help
    Replies: 12
    Last Post: 11-10-2007, 12:54 AM
  4. type mismatch help
    By 1-DUB in forum OSR Help
    Replies: 5
    Last Post: 05-27-2007, 05:14 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
  •