BucketStringOp

GameSpy SDK

BucketStringOp

Performs an operation on a bucket for a game.

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

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

Performs an operation on a bucket for a game; 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).

Example

To set the name of a player whose name was not known when NewPlayer() was called:

    BucketStringOp(game, "player", bo_set, realplayername, bl_player, pnum)