Results 1 to 11 of 11

Thread: Funny Error

  1. #1
    Join Date
    Jul 2007
    Location
    UK
    Posts
    307
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default Funny Error

    I get this Error:
    Line 115: [Error] (14564:65): Type mismatch in script C:\Documents and Settings\Administrator\My Documents\Tut runner\Num.scar

    Heres the code
    SCAR Code:
    program Tut_Runner;
    {.include SRL/SRL.scar}

    const

         //Program Constants\\
         RandomRangeInteger = 10; //Must be Integer and at least 1 more than RandomClickNum.
         RandomClickNum = 1; //Must be Integer and at least 1 less than RandomRangeInteger.
         smooth = true;
    var
    LooperInteger, RandomInteger, Mox, Moy, ClickCont, xx, yy, XDump, YDump, WhichArrow, FemaleOrMale : Integer;


    //By bullzeye95 slightly edited... XD
    function IsEvenReturn(ValueId: Integer): Boolean;
    begin
      Result:= ((ValueId mod 2) = 0);
    end;

    procedure ClickerMouse(BoolLeft: Boolean);
    begin
      GetMousePos(Mox, Moy);
      HoldMouse(Mox, Moy, BoolLeft);
      wait(14+random(100));
      ReleaseMouse(Mox, Moy, BoolLeft);
    end;

    procedure LoadBMPs;
    begin
      ClickCont := BitmapFromString2(False, 'aA909D78DAE594410EC3' +
           '200C04BF8401033E020DFF7F523195A248C8C429EAA9398CD0621' +
           '6D622186300C0F4AFB60E9773271E89590E6618CA8BE9B8C4600A' +
           '9DC1D5736C93E7310EA58D59CB953EBACE68590F8D983414283C5' +
           'B7997509015B2E73879D6A10C8BD66616CA9840A4258A2851F4FC' +
           'D44C0E62A55023291A4F29DD4D6A29EF75AD7086B522EA1767699' +
           '5C673CEB576D37027AF2ACBB2F36B4FCD5DD2DCE1FDBC9A3E3FAD' +
           'D9EFF02FF2EA77D4F4E7E93BB09FFABBBD6EDE37F5FFABF2FC1BB' +
           'E01231');
    end;

    procedure CharButton(Color1, xc1, yc1, xd1, yd1, tol1, Color2, xc2, yc2, xd2, yd2, tol2, RandClickNum, RandRangeInteger: Integer);
    begin
    WhichArrow := RandomRange(RandomRange(1, 10), RandomRange(11, 20));
    if(IsEvenReturn(WhichArrow)) then
     begin
       if(FindColorTolerance(xx, yy, Color1, xc1, yc1, xd1, yd1, tol1)) then
         begin
           wait(200+random(300));
           MMouse(xx, yy, 10, 8);
           RandomInteger := RandomRange(RandClickNum, RandRangeInteger);
           for LooperInteger := 0 to RandomInteger do
             begin
               wait(300+random(2101));
               ClickerMouse(true);
             end;
         end;
     end;

    if(not IsEvenReturn(WhichArrow)) then
     begin
       if(FindColorTolerance(xx, yy, Color2, xc2, yc2, xd2, yd2, tol2)) then
         begin
           wait(200+random(300));
           MMouse(xx, yy, 10, 8);
           RandomInteger := RandomRange(RandClickNum, RandRangeInteger);
           for LooperInteger := 0 to RandomInteger do
             begin
               wait(300+random(2000));
               Mouse(xx, yy, 3, 3, true);
             end;
         end;
     end;
    end;

    procedure CharLook;
    begin
    FemaleOrMale := RandomRange(1 , 20);
    if(IsEvenReturn(FemaleOrMale)) then
     begin
       if(FindColorTolerance(xx, yy, 2070783, 421, 277, 490, 309, 3)) then
        begin
          Mouse(xx, yy, 3, 3, true);
          wait(100+random(154));
        end;
     end;

    CharButton(12172745, 27, 72, 78, 104, 5, 12172745, 140, 74, 192, 107, 5, RandomClickNum, RandomRangeInteger);
    CharButton(12172745, 27, 108, 80, 142, 5, 12172745, 139, 108, 193, 143, 5, RandomClickNum, RandomRangeInteger);
    CharButton(12172745, 28, 146, 79, 176, 5, 12172745, 141, 146, 190, 177, 5, RandomClickNum, RandomRangeInteger);
    CharButton(12172745, 29, 178, 76, 212, 5, 12172745, 141, 177, 188, 213, 5, RandomClickNum, RandomRangeInteger);
    CharButton(12172745, 33, 213, 77, 247, 5, 12172745, 142, 215, 189, 247, 5, 1, 2);
    CharButton(12172745, 31, 248, 81, 281, 5, 12172745, 144, 247, 191, 280, 5, RandomClickNum, RandomRangeInteger);
    CharButton(12172745, 27, 284, 81, 313, 5, 12172745, 139, 283, 190, 314, 5, RandomClickNum, RandomRangeInteger);
    CharButton(12172745, 331, 79, 378, 113, 5, 12172745, 440, 78, 489, 114, 5, RandomClickNum, RandomRangeInteger);
    CharButton(12172745, 327, 133, 375, 149, 5, 12172745, 442, 114, 487, 148, 5, RandomClickNum, RandomRangeInteger);
    CharButton(12172745, 327, 151, 376, 185, 5, 12172745, 436, 148, 490, 183, 5, RandomClickNum, RandomRangeInteger);
    CharButton(12172745, 330, 183, 378, 217, 5, 12172745, 443, 185, 490, 219, 5, RandomClickNum, RandomRangeInteger);
    CharButton(12172745, 328, 219, 378, 259, 5, 12172745, 443, 220, 489, 256, 5, RandomClickNum, RandomRangeInteger);

    if(FindColorTolerance(xx, yy, 49152, 210, 261, 303, 310, 0)) then
     begin
       wait(200+random(600));
       Mouse(xx, yy, 10, 8, true);
     end;
    end;

    procedure GuideRoom;
    begin
      PerfectNorth;
      wait(300+random(700));
      HighestAngle;
      wait(300+random(200));
      LooperInteger:= 0;

      while(LooperInteger = 0 and FindBitmap(ClickCont, XDump, YDump) = False) do // Line 115
       begin
         if(FindColorTolerance(xx, yy, 397183, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 331107, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 331119, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 198456, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 198465, 6, 7, 513, 335, 10) or FindColorTolerance(xx, yy, 198991, 6, 7, 513, 335, 10)) then
          begin
            wait(300+random(100));
            if(FindColorTolerance(xx, yy, 15460843, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 5524820, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 10128539, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 11445166, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 15263464, xx, yy, xx+20, yy+20, 15) or FindColorTolerance(xx, yy, 4011837, xx, yy, xx+20, yy+20, 15)) then
             begin
               wait(300+random(100));
               MMouse(xx, yy, 5, 5);
               wait(300+random(100));
               if(Option2('Rune')) then
                begin
                  ClickerMouse(true);
                  wait(300+random(100));
                  LooperInteger := 1;
                end;
             end;
          end;
       end;
    end;


    begin
    LoadBMPs;
    MouseSpeed := 4;
    rs_DeleteUID;
    ActivateClient;
    wait(2000);
    SetupSRL;
    GuideRoom;
    end.

    Its a tut runner and At line 115 it goes into a loop untill it finds the guide and talks to him it will only be able to stop when it knows that
    1. That script has clicked
    2. that it was not miss clicking by seeing the "Click Here to..." text but I keep getting that error, I changed the Variables names ect...ect I can't think of any reason why it can't work

    The Loop can lag abit if it dose not find him in a few seconds

  2. #2
    Join Date
    Nov 2006
    Posts
    189
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, we're not going to sit here and count out the lines of code to reach line 115, so just post line 115
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig

  3. #3
    Join Date
    Jun 2007
    Location
    ENGLAND
    Posts
    220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    DOESNT THE ERROR GIVE YOU A HINT -

    TYPE MISMATCH
    YOU SPELT SOMTHING WRONG NEWB ^.^
    I DNT KNOW WOT COS U GOT HALF THE SCRIPT THER



    sheeeeezus

  4. #4
    Join Date
    Nov 2006
    Posts
    189
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Exppo just earned himself a few noob points by spelling the way he did. Try nt to spl lyke ths coz its rly annyin Spell properly.
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig

  5. #5
    Join Date
    Jul 2007
    Location
    UK
    Posts
    307
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by exppo View Post
    DOESNT THE ERROR GIVE YOU A HINT -

    TYPE MISMATCH
    YOU SPELT SOMTHING WRONG NEWB ^.^
    I DNT KNOW WOT COS U GOT HALF THE SCRIPT THER



    sheeeeezus
    Lol thats all of it Oh and its not a spelling mistake you can look up "FindBitmap" In Scar Help and you WILL find it ....


    Oh and yeh Most people ask for the script or would you just like the line its pointed out now....

    I look at about 20 times IM PRETTY SURE its not a spelling mistake unless you point it out AND MISMATCH CAN ALSO BE KNOWEN AS MISSED PLACED.....

    ITS NOT A SPELLING MISTAKE IF IT WAS it would proably come up as sometihng is expected or undefined something or unknowen... you can search that script all day long you WONT find a spelling mistake

  6. #6
    Join Date
    Oct 2006
    Location
    I'm also from Michigan!
    Posts
    563
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Type mismatch means you set a variable to something it was not.
    SCAR Code:
    i: integer;
    i:='string';
    that would give you a type mismatch because "i" is an integer and you tried to make it a string. like said before, im not gonna find line 115, but im sure thats the problem. Hit f1 while in scar and looking up "Conversion". Itll show you how to convert to the correct variable type.

    hope this makes sense.

  7. #7
    Join Date
    Jul 2007
    Location
    UK
    Posts
    307
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Your Going Somewhere but only Suspects could Be ClickCont XDump YDump
    But XDump And YDump Arew what they should be but ClickCont is considered a Integer & in picture to string you count the Variable as Integer ? Thats also correct


    AND LINE 155 IS pointed out...

  8. #8
    Join Date
    Nov 2006
    Posts
    1,103
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    *cough*use ( and ) if you use an and *cough*
    Infractions, reputation, reflection, the dark side of scripting, they are.

  9. #9
    Join Date
    Jun 2006
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    while((LooperInteger = 0) and (not FindBitmap(ClickCont, XDump, YDump))) do

    Fixed

    BTW, cathering, Da der der was talking about exxpo, not u.

    Exxpo, dont talk bout shit u dont know.

  10. #10
    Join Date
    Jul 2007
    Location
    UK
    Posts
    307
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Infintry001 View Post
    SCAR Code:
    while((LooperInteger = 0) and (not FindBitmap(ClickCont, XDump, YDump))) do

    Fixed

    BTW, cathering, Da der der was talking about exxpo, not u.

    Exxpo, dont talk bout shit u dont know.
    Thanks, at least theres someone decent

  11. #11
    Join Date
    Jun 2006
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    haha no problem

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Fun/Funny
    By A G E N T in forum Misc. Links and Programs
    Replies: 0
    Last Post: 06-27-2007, 03:02 PM
  2. lol thats funny
    By Dark_Sniper in forum RS has been updated.
    Replies: 7
    Last Post: 05-01-2007, 03:01 PM
  3. sry this is just funny
    By Portal in forum News and General
    Replies: 7
    Last Post: 05-18-2006, 02:11 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
  •