Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> usraccountreserveset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 UsrAccountReserveSet()
------------------------------------------------------------------------------
 Purpose:
 Set a reserve amount on a user's account.

 Syntax:
 bResult = UsrAccountReserveSet(lpszUserName, dwAmount)

 Parameters:
 lpszUserName The name of the user.
 lAmount      The amount to reserve.

 Returns:
 A boolean value (TRUE or FALSE).

 The CA-Clipper name for this function is:
 UsrAccResSet()

 Description:
 UsrAccountReserveSet() reserves a specified amount lAmount of the
 balance of user lpszUserName for a forthcoming event.

 The reserved amount is deducted from the user balance immediately and saved
 as reserved to prevent other accounting servers from using it. When charges
 to the user are subsequently incurred, the charge is deducted from the
 reserved amount.

 Returns TRUE if successful or FALSE if an error occurs.

 Example:
 // To reserve $10.00 from user STUART's account:
 if ( UsrAccountReserveSet( "STUART", 1000 ) )
    ? "User Stuart has reserved $10.00 from his account"
 else
    ? "There is not enough balance to make the reservation"
 endif

 Notes:
 This function is preferable to UsrAccountChargeAdd() because it
 ensures there is a sufficient balance before deducting the charge from the
 user's balance.

See Also: UsrAccountReserveGet() UsrAccountChargeAdd() UsrAccountChargeDelete() FSAccountServerAdd()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson