Difference between revisions of "User withdrawPoints"
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:User_Functions]] | [[Category:User_Functions]] | ||
− | + | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>User_withdrawPoints</nowiki>|Parameters= | |
− | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>points</nowiki>|Description=<nowiki>Number of points to remove</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>description</nowiki>|Description=<nowiki>User visible log entry associated with the transaction</nowiki>}} | |
− | ==== | + | |InClass=<nowiki>User</nowiki> |
− | + | |Description=<nowiki>Remove points from user of current QAS. Returns 0 if count not withdraw the necessary amount.</nowiki>}} | |
− | + | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>User_withdrawPoints</nowiki>|Parameters= | |
− | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>points</nowiki>|Description=<nowiki>Number of points to remove</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>description</nowiki>|Description=<nowiki>User visible log entry associated with the transaction</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceId</nowiki>|Description=<nowiki>Resource Id of user that gets the points</nowiki>}} | |
− | + | |InClass=<nowiki>User</nowiki> | |
− | + | |Description=<nowiki>Remove custom points from user. Returns 0 if count not withdraw the necessary amount.</nowiki>}} | |
− | + | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>User_withdrawPoints</nowiki>|Parameters= | |
− | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>points</nowiki>|Description=<nowiki>Number of points to remove</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>description</nowiki>|Description=<nowiki>User visible log entry associated with the transaction</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceId</nowiki>|Description=<nowiki>Resource Id of user that gets the points</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>customType</nowiki>|Description=<nowiki>Store custom transaction type. Can be 1-127, or 0 for ManualTransaction</nowiki>}} | |
− | + | |InClass=<nowiki>User</nowiki> | |
− | + | |Description=<nowiki>Remove custom points from user. Returns 0 if count not withdraw the necessary amount.</nowiki>}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
'''Example''' | '''Example''' | ||
− | + | <source lang="javascript"> | |
− | + | number p = User_withdrawPoints(120, "Withdraw", 456546); | |
− | + | //return 0 or the number of withdrawn points | |
− | + | </source> | |
− | |||
− | |||
− | |||
− | < |
Latest revision as of 10:32, 2 June 2020
- int User_withdrawPoints(int points "Number of points to remove", string description "User visible log entry associated with the transaction") - Remove points from user of current QAS. Returns 0 if count not withdraw the necessary amount.
- int User_withdrawPoints(int points "Number of points to remove", string description "User visible log entry associated with the transaction", int userResourceId "Resource Id of user that gets the points") - Remove custom points from user. Returns 0 if count not withdraw the necessary amount.
- int User_withdrawPoints(int points "Number of points to remove", string description "User visible log entry associated with the transaction", int userResourceId "Resource Id of user that gets the points", int customType "Store custom transaction type. Can be 1-127, or 0 for ManualTransaction") - Remove custom points from user. Returns 0 if count not withdraw the necessary amount.
Example
number p = User_withdrawPoints(120, "Withdraw", 456546);
//return 0 or the number of withdrawn points