BucketFloatOp

GameSpy SDK

BucketFloatOp

Performs an operation on a bucket for a game.

double BucketFloatOp(
statsgame_t game,
char * name,
bucketop_t operation,
double value,
bucketlevel_t bucketlevel,
int index );
RoutineRequired HeaderDistribution
BucketFloatOp<gstats.h>SDKZIP

Return Value

Returns the resultant bucket value.

Parameters

game
[in] The game to send containing the bucket you want to operate on. If NULL, uses most recently created game.
name
[in] The name of the bucket to update.
operation
[in] Indicates the operation to perform on the bucket.
value
[in] Argument for the operation.
bucketlevel
[in] Determines whether you are referring to a server, player, or team bucket.
index
[in] For player or team buckets, the internal reference, as passed to NewPlayer or NewTeam.

Remarks

if the bucket doesn't exist already, the call will set the bucket to whatever "value" is. You can create each bucket explicitly by using the bo_set operation with whatever initial value you want the bucket to have.

Each bucket type (int, float, or string) has its own operation function, always call the same one for each bucket (i.e. don't create a bucket with BucketIntOp then try to add a float with BucketFloatOp).