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> usraccresset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 UsrAccResSet()
------------------------------------------------------------------------------
 Purpose:
 Set a reserve amount on a user's account.

 Syntax:
 bResult = UsrAccResSet(lpszUserName, dwAmount)

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

 Returns:
 A boolean value (TRUE or FALSE).

 Description:
 UsrAccResSet() 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 ( UsrAccResSet( "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 UsrAccChgAdd() because it
 ensures there is a sufficient balance before deducting the charge from the
 user's balance.

See Also: UsrAccResGet() UsrAccChgAdd() UsrAccChgDel() FSAccSrvAdd()

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