Results 1 to 13 of 13

Thread: HELP Error: Type Mismatch

  1. #1
    Join Date
    Jun 2007
    Location
    I live in a hobbit hole.
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default HELP Error: Type Mismatch

    Ok, im am stuck making this procedure so somebody please post what I am doing wrong & what needs to be changed.






    Line 75: [Error] (12729:69): Type mismatch in script C:\Users\-----\Desktop\A Work In Progress.scar



    SCAR Code:
    procedure open bank;
         Var
         x, y :integer;
         a, b :integer;
           begin;
             MakeCompass('n');
             FindColorsSpiralTolerance(x, y, Points, 4679037, 5, 5, 514, 336, 70)true;  //Line 75
             FindBitmapToleranceIn(BankBooth, a, b, 536, 12, 711, 158, 25);
             ClickMouseSpline(X, Y, 4, 4, True);
             Wait(1000+Random(500));
             ClickMouseSpline(a, b, 4, 4, true);
             end;
    http://img511.imageshack.us/img511/3...2bannerlx0.gifhttp://img367.imageshack.us/img367/5641/mybannerst2.gif
    انا عربي حتى لا تكون عنصرية!
    If you have a PSP and you are bored with it go here and look around.

  2. #2
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    FindColorsSpiralTolerance(x, y, Points, 4679037, 5, 5, 514, 336, 70)true

    what is points? and why you put true

    its

    mouse(x,y,0,0,true); after the proc
    but remember to put MMouse(x,y,0,0); first

    and the first 1 im not sure but looks wrong, i dont deal with bitmaps much sorry.

    btw mismatch means like you have declared the function wrong.
    example:
    If (FindColorSpiralTolerance(x, y, 234525, MSX1, MSY1, MSX2, MSY2, )) then
    see theres no tolerance in the end
    suppose to be:
    If (FindColorSpiralTolerance(x, y, WillowColor, MSX1, MSY1, MSX2, MSY2, 3)) then

    gl

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

    Default

    Yah FindColorsSpiralTolerance is different then FindColorSpiralTolerance. It will collect multiple points (coords) of that color, and it stores it in a TPointArray. You would then use it like this in my Soon-To-Come miner:

    SCAR Code:
    FindColorsSpiralTolerance(257, 173, RockTPA, Rock_Color, MSX1, MSY1, MSX2, MSY2, 5);
      for I := 0 to High(RockTPA) do
      begin
        MMouse(RockTPA[i].x, RockTPA[i].y, 1, 1);
        Wait(100 + Random(100));
        if(IsUpTextMultiCustom(['Min', 'ine', 'Roc', 'ocks'])) then
        begin
          Mouse(RockTPA[i].x, RockTPA[i].y, 1, 2, true);
          Wait(100 + Random(100));
          Writeln('Found the ' + Players[CurrentPlayer].Strings[0] + ' rock.');
          Flag;
          Exit;
        end;
      end;

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

    Default

    If you want it like that it should be:

    SCAR Code:
    If FindColorsSpiralTolerance(x, y, Points, 4679037, 5, 5, 514, 336, 70) = True Then


    Hope I Helped

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

    Default

    Nauman, the =true is not needed. you never need =true or false. Only if not( and if(

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

    Default

    Quote Originally Posted by The[Cheese] View Post
    Nauman, the =true is not needed. you never need =true or false. Only if not( and if(

    Yeah but If
    you want to use it like that, Some scripters still use that method m8

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

    Default

    Um no need for the flame. Anyway you say it needs to be there and all i am saying is it doesnt. Hold your temper?

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

    Default

    Quote Originally Posted by The[Cheese] View Post
    Um no need for the flame. Anyway you say it needs to be there and all i am saying is it doesnt. Hold your temper?
    Yes and.... Some people may want to use that?


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

    Default

    Well sorry, but some people may want to use my way too I still see no need for the flame.

  10. #10
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Yes and.... Some people may want to use that?

    DUDE The Cheese is owning you! It Doesn't Have A Boolean Serious Idiot
    ~Hermen

  11. #11
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    All three of you just stop it! Nauman was showing the way it looked like he wanted to do it as he had a true afterwards which he thought meant he wanted if(blah) = True then. The Cheese's way was the way it would normally be done. Hermpie, that's so spam, so go kill yourself

    Anyway, as he wasn't actually replied and he had a type mismatch I would assume that his problem wasn't related to the true afterwards and instead because he hasn't declared Points as a global TPointArray. Also, you may want to use MSCX and MCSY instead of x and y also use MSX1 MSY1, MSX2 and MSY2 instead of your 5, 5, 514 and 336 and also maybe a lot less tolerance. Lastly, there is already a SRL function for opening banks. Check SRL/core/bank.scar -> OpenBankFast. You then put in a string for the location's bank and it will open it nicely for you.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

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

    Default

    hehe sorry there mix. anyway yah I just realized too that FindColorsSpiralTolerance doesn't even return a boolean rOfL

  13. #13
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Rouge, it looks like what you are doing there is what FindColorSpiralTolerance is made for, not FindColorsSpiralTolerance.

    FindColorsSpiralTolerance doesn't store anything to the X and Y, those are the starting points it will spiral outwards from.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. ERROR type mismatch
    By shaman in forum OSR Help
    Replies: 5
    Last Post: 12-17-2008, 01:02 AM
  2. Type Mismatch Error?
    By crossback7 in forum OSR Help
    Replies: 2
    Last Post: 06-23-2007, 05:28 PM
  3. Type mismatch error...
    By Hobbit in forum OSR Help
    Replies: 8
    Last Post: 02-13-2007, 04:45 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
  •