Results 1 to 2 of 2

Thread: Line 239: [Error] (22471:66): Type mismatch in script

  1. #1
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default Line 239: [Error] (22471:66): Type mismatch in script

    SCAR Code:
    function FindDoorColor: Integer;
    var
      rx, ry : integer;
    begin
      FindColorRecordEx(rx, ry, 3227209, MSX1, MSY1, MSX2, MSY2, false); // error line
    end;

    any help?

  2. #2
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    The third parameter needs to be a TAutoColorInfo, not an integer.

    EDIT: Here's the description of it in Globals.scar:

    SCAR Code:
    { type TAutoColorInfo;

      Description: Set of information that can be used in some functions. }


    type

      TAutoColorInfo = record

        Name: string;

        Color: Integer;

        ColorArray: TIntegerArray;

        MinCount: Integer;

        MaxCount: Integer;

        MaxDist: Integer;

        MaxDistCenter: Integer;

        UpText: string;

        UpTextMulti: TStringArray;

        HueMod, SatMod: Extended;

        LumTol: Integer;

        MinR, MaxR, MinG, MaxG, MinB, MaxB: Integer;

        MinX, MaxX, MinY, MaxY, MinZ, MaxZ: Extended;

    end;
    :-)

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
  •