Results 1 to 4 of 4

Thread: WithdrawItem()

  1. #1
    Join Date
    Oct 2011
    Posts
    422
    Mentioned
    15 Post(s)
    Quoted
    116 Post(s)

    Default WithdrawItem()

    Simba Code:
    (*
    WithdrawItem
    ~~~~~~~~~~~~

    .. code-block:: pascal

        function WithdrawItem(Ident: integer; IdentType: string; Amount: integer;
                               UpText: TStringArray; Tol: TIntegerArray): boolean;

    Withdraws an item using WithdrawItemEx, but removes the Index check.

    .. note::

        Author: Nava2
        Last Modified: Unknown

    Example:

    .. code-block:: pascal

        if WithdrawItem(theColor, 'color', 27, ['ew log', 'ew l'], [3]) then
        CloseBank;
    *)

    function WithdrawItem(Ident: integer; IdentType: string; Amount: integer; UpText: String; Tol: TIntegerArray): boolean;

    The function parameter, uptext: String, should reflect its documentation

  2. #2
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    I don't really understand what the issue is here. Is it that the documentation says it should be a TStringArray but the actual function only uses a single string?

  3. #3
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Yeah basically the doc is slightly inaccurate.
    It should be 'doc should reflect the actual function', rather than the other way round lol.

    IMO WithdrawItemEx should use TSA instead, and since it doesn't you will have to edit it (WaitUpText>WaitUpTextMulti in the function) to use TSA. (Or send a pull request)

  4. #4
    Join Date
    Oct 2011
    Posts
    422
    Mentioned
    15 Post(s)
    Quoted
    116 Post(s)

    Default

    Quote Originally Posted by riwu View Post
    Yeah basically the doc is slightly inaccurate.
    It should be 'doc should reflect the actual function', rather than the other way round lol.

    IMO WithdrawItemEx should use TSA instead, and since it doesn't you will have to edit it (WaitUpText>WaitUpTextMulti in the function) to use TSA. (Or send a pull request)
    I agree with you, however

    Having TSA expands the capabilities of withdrawex, hence the reason why I suggested it should be in place instead of String

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
  •