Results 1 to 4 of 4

Thread: how to

  1. #1
    Join Date
    Jul 2008
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default how to

    how to use a set of info like so

    TPA[0].x := 59
    TPA[0].y := 162
    TPA[1].x := 59
    TPA[1].y := 163
    TPA[2].x := 59
    TPA[2].y := 164
    TPA[3].x := 59
    TPA[3].y := 165

    put it in a way so i can call it later for use like this
    SCAR Code:
    for i:= 0 to high(tpa) do
    begin
      if(getcolor(tpa[i].x,tpa[i].y)=23121)then
        begin
          writeln('foundcolor');
          exit;
        end;
    end;
    something along those lines. thanks in advanced

  2. #2
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    what exactly is the info you need to store?
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  3. #3
    Join Date
    Jul 2008
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    just points like x,y but i want to have a array of info that i set like
    SCAR Code:
    MyTpa [0]:= inttopoint(1, 1);
      MyTpa [1]:= inttopoint(10, 10);
    like that but more points of course


    EDIT: never mind i found out
    Last edited by radiclerobby; 04-24-2010 at 01:14 AM.

  4. #4
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    SCAR Code:
    var
      tpa : TPointArray;
      i : integer;
    begin
      tpa := [point(59, 162), point(59, 163), point(59, 164), point(59, 165)]
      for i:= 0 to high(tpa) do
      begin
        if(getcolor(tpa[i].x,tpa[i].y)=23121)then
        begin
          writeln('foundcolor');
          exit;
        end;
      end;
    end;

    like so?
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

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
  •