SBServerGetPlayerFloatValue

GameSpy SDK

SBServerGetPlayerFloatValue

Returns the value associated with the specified player's key. This value is returned as the appropriate type. Float, int or string.

double SBServerGetPlayerFloatValue(
SBServer server,
int playernum,
const gsi_char * key,
double fdefault );
RoutineRequired HeaderDistribution
SBServerGetPlayerFloatValue<sb_serverbrowsing.h>SDKZIP

Return Value

If the player or key is invalid or missing, the specified default is returned. For an existing key, the value is converted from string form to the appropriate data type. These functions do not perform any type checking.

Parameters

server
[in] A valid SBServer object.
playernum
[in] The zero based index for the desired player.
key
[in] The value associated with this key will be returned.
fdefault
[in] The value to return if the key is not found.

Remarks

These functions are usefull for converting custom player keys to a native data type. No type checking is performed, the string value is simply cast to the appropriate data type. If a key is not found,the supplied default is returned.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
SBServerGetPlayerFloatValueSBServerGetPlayerFloatValueASBServerGetPlayerFloatValueW

SBServerGetPlayerFloatValueW and SBServerGetPlayerFloatValueA are UNICODE and ANSI mapped versions of SBServerGetPlayerFloatValue. The arguments of SBServerGetPlayerFloatValueA are ANSI strings; those of SBServerGetPlayerFloatValueW are wide-character strings.