Results 1 to 10 of 10

Thread: Type Missmatch :X

  1. #1
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default Type Missmatch :X

    Why does this result in a type missmatch ?

    FindItem(x,y,'bmp_Ore_Gold',315,70,499,230,5,3)

    function FindItem(var x, y: Integer; IdentType: string; Ident, x1, y1, x2, y2: Integer; Tol: TIntegerArray): Boolean;
    By: Nava2
    Description: Finds an item in Area specified by x1, y1, x2, y2 in the Area.
    Valid IdentTypes are any of the SRL_Item types. The Tol variable is:
    Tol[0] : Color Tolerance;
    Tol[1] : Contour Tolerance or minimum Colors to Find to be True.
    ************************************************** *****************************}

  2. #2
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Do this instead:
    SCAR Code:
    FindItem(x,y,'bmp',bmp_Ore_Gold,315,70,499,230,[5,3])
    Last edited by senrath; 06-19-2009 at 04:40 AM.

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

    Default

    'bmp_Ore_Gold' should be bmp_Ore_Gold, without the '' because it is an integer not a string.

  4. #4
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    You just want to have 'bmp', then the identifier afterwards (bmp_Ore_Gold);

  5. #5
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    bmp_Ore_Gold isnt a string, so dont have the ''s
    It is an integer.

    E: DANG ninja'd by 3 people!

    T~M

  6. #6
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    var
      b: Integer;
    begin
      b := srl_GetBitmap(bmp_Gold_Ore);
      FindItem(x,y,'bmp', b, 315,70,499,230,[5, 3]); // why two tolerances?
      FreeBitmap(b);
    end;

    You were all wrong. Post ninja'd plx.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  7. #7
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    SCAR Code:
    var
      b: Integer;
    begin
      b := srl_GetBitmap(bmp_Gold_Ore);
      FindItem(x,y,'bmp', b, 315,70,499,230,[5, 3]); // why two tolerances?
      FreeBitmap(b);
    end;

    You were all wrong. Post ninja'd plx.
    You have to call srl BMPs? Never used them personally.

  8. #8
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Thanks ALot . It Works now.

    But it doesnt detect the Ore .

    FindItem(x,y,'bmp',bmp_Ore_Gold,315,70,499,230,[5,3])

    Im Trying to detect it in the TradeScreen ;/..

    Ill probably just use FindBitmap instead...

  9. #9
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Why not use a DTM? =X

  10. #10
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by 99_ View Post
    Why not use a DTM? =X
    I did that now

Thread Information

Users Browsing this Thread

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

Posting Permissions

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