In file useracc.h:

int usr_canpay

(int amount)

Check if the user has enough credits.

Documentation

Check if the user has enough credits.

Checks if the current user has enough credits, presumably as a preamble to charging the user's account. Don't forget that credits are a constantly diminishing quantity. Always check if a user can pay, but do it right before charging the user. Otherwise, the user may be able to pay now, but not when you actually call usr_chargecredits().

Parameters:
amount - The number of credits to check for.
Returns:
Non-zero if the user's credits are greater than or equal to amount. Zero otherwise.
See Also:
usr_postcredits().

Alphabetic index



This page was generated with the help of DOC++.