Skip to main content
Version: 5.7.0

IncrementGlobalStats

Atomically increment (or decrement) global statistics. Global statistics are defined through the brainCloud portal.

StatisticsData like

{ "stat1" : 10, "stat2" : -5.5 }

would increment stat1 by 10 and decrement stat2 by 5.5. For the full statistics grammar see the statistics grammar section.

There are many more complex operations supported such as

{ "stat1" : "INC_TO_LIMIT#9#30" }

which increments stat1 by 9 up to a limit of 30.

ServiceOperation
globalGameStatisticsUPDATE_INCREMENT

Method Parameters

ParameterDescription
statisticsA collection containing the statistics to increment.

Usage

http://localhost:3000
// S2S call: to view example, switch to the Cloud Code or Raw tab.
JSON Response
{
"status": 200,
"data": {
"statistics": {
"PLAYER_COUNT": 16
}
}
}