Results 1 to 4 of 4

Thread: Identifier expected please help

  1. #1
    Join Date
    Mar 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Identifier expected please help

    function KillChicken: Boolean;
    var
    RTPA: TPointArray;
    i: Integer;
    ATPA: T2DPointArray;
    T2DExtendedArray:
    begin
    SetColortolerancespeed(3);
    FindColorsSpiralTolerance(MSCX, MSCY, RTPA, 5095895, MSX1, msy1, msx2, msy2, 5)
    Setcolortolerancespeed(0);
    RAaSTPAEx(RTPA,3,3);
    if Length(RTPA) = 0 then
    writeln('Didn''t find chick colors.');
    SplitTPAExWrap(RTPA, 15, 15, ATPA);
    if (Length(ATPA) > 0) then
    SortATPAFrom(ATPA, Point(MSCX, MSCY))
    else
    Exit;

    when trying to run this script it says "Identifier expected at line 26
    Compiling failed."
    line 26 is where it says 'begin' any help is greatly appreciated
    sorry f i posted this in the wrong place im new to simba

  2. #2
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    add a End; at the end

  3. #3
    Join Date
    Mar 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    there is an end. at the end of the script this is just a segment showing whats wrong

  4. #4
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Oh I see

    Simba Code:
    T2DExtendedArray:

    that is a type of variable, you never declared a variable there


    Simba Code:
    function KillChicken: Boolean;
    var
      RTPA: TPointArray;
      i: Integer;
      ATPA: T2DPointArray;
      //T2DExtendedArray:
    begin
      SetColortolerancespeed(3);
      FindColorsSpiralTolerance(MSCX, MSCY, RTPA, 5095895, MSX1, msy1, msx2, msy2, 5) Setcolortolerancespeed(0);
      RAaSTPAEx(RTPA, 3, 3);
      if Length(RTPA) = 0 then
        writeln('Did not find chicken colors.');
      SplitTPAExWrap(RTPA, 15, 15, ATPA);
      if (Length(ATPA) > 0) then
        SortATPAFrom(ATPA, Point(MSCX, MSCY))
      else
        Exit;
    End;

    For every begin you need an 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
  •