Results 1 to 12 of 12

Thread: STUPID error...

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

    Default STUPID error...

    This is probably a PebKac (google that ) But im getting a Variable expected in here:

    SCAR Code:
    procedure MyClickToContinue;
    var
      TheColor: integer;
    begin
      repeat
        if(FindColorSpiralTolerance(265, 453, 16711680, 95, 399, 488, 468, 15))then //<--- this line!
        begin
          Mouse(x, y, 0, 0, true);
          GetMousePos(x, y);
          TheColor := GetColor(x, y);
          wait(200);
          MouseBox(102, 370, 465, 411, 3);
          FindPleaseWait(ColorFound);
          wait(1000 + Random(3000));
          Result := true;
        end;
      until not(FindColorSprialTolerance(265, 453, 16711680, 95, 399, 488, 468, 15));
    end;
    Extinct.

    Formally known as Drags111.

  2. #2
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    function FindColorSpiralTolerance(var x,y: Integer; color, xs, ys, xe, ye: Integer; Tolerance: Integer): Boolean

    x and y must variables to store the coords at which the color is found. You have given it numbers, not variables.

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

    Default

    ROFL THATS NOT IT! HAHAHAHAHA I put a result on a function HAHAHAHAH! thats funny! Although that would have been a problem too :P, I would have found that xD
    Extinct.

    Formally known as Drags111.

  4. #4
    Join Date
    Jan 2008
    Location
    Stanford, CA
    Posts
    329
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    findcolorsspiraltolerance needs a TPA right?

    EDIT: srry thought u did COLORS spiral tolerance not Color. but i think u needa put an "x,y" there dude. cause thats where it stores the color.

  5. #5
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What?! When i change it to a variable, It compiles.

  6. #6
    Join Date
    Jan 2008
    Location
    Stanford, CA
    Posts
    329
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Macrosoft View Post
    What?! When i change it to a variable, It compiles.
    haha....funny funny guy....dont laugh too hard cheese

  7. #7
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    seriously, it works, whats so funny?

    Also, you need to put

    procedure MyClickToContinue: Boolean;

    Because the variable result wont work unless you specify what the type of data being returned.

  8. #8
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Macrosoft View Post
    seriously, it works, whats so funny?

    Also, you need to put

    procedure MyClickToContinue: Boolean;

    Because the variable result wont work unless you specify what the type of data being returned.
    Nope. You need to put

    function MyClickToContinue: Boolean;

    Procedures dont return values.

  9. #9
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol, sry
    its to late to be helping ppl, i need my sleep
    I assure you I am not THAT stupid. My IQ DOES have more than one digit, I swear

  10. #10
    Join Date
    Jan 2008
    Location
    Stanford, CA
    Posts
    329
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Macrosoft View Post
    seriously, it works, whats so funny?

    Also, you need to put

    procedure MyClickToContinue: Boolean;

    Because the variable result wont work unless you specify what the type of data being returned.
    sorry i know but i thought u were inferring something else, my bad

  11. #11
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol, I unknowingly made a funny joke?? *in Borat accent* Very nice!

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

    Default

    -.- FindColorSspiraltolerance doesn't return a boolean just to tell u
    but your not using it so
    ~Hermen

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. a stupid form error -.-
    By RudeBoiAlex in forum OSR Help
    Replies: 5
    Last Post: 10-26-2007, 12:27 AM
  2. Stupid error
    By yanix in forum OSR Help
    Replies: 6
    Last Post: 09-08-2007, 09:19 PM

Posting Permissions

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