Results 1 to 2 of 2

Thread: WaitFunc and arguments

  1. #1
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default WaitFunc and arguments

    I have some stupid problem with WaitFunc. I can't put in it function with any argument. For example:

    Simba Code:
    Function MyFunction: Boolean;

    Simba Code:
    WaitFunc(@MyFunction,100,1000);

    Compiled well. But if I add any argument to function:

    Simba Code:
    Function MyFunction(a:integer): Boolean;

    Simba Code:
    WaitFunc(@MyFunction(3),100,1000);

    Type mismatch error.

    Also I tried:

    Simba Code:
    WaitFunc((@MyFunction(3)),100,1000);
    Simba Code:
    WaitFunc(@(MyFunction(3)),100,1000);

    Neither works. How to do that?

  2. #2
    Join Date
    Mar 2006
    Location
    Behind you
    Posts
    3,193
    Mentioned
    61 Post(s)
    Quoted
    63 Post(s)

    Default

    Put it inside another boolean function

    Simba Code:
    Function What : Boolean;
    begin
      Result := DoWhat(100,200, True);
    end;

    Waitfunc(@what, 100, 500);

    "Sometimes User's don't need the Answer spelled out with Code. Sometimes all they need is guidance and explanation of the logic to get where they are going."

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
  •