SBServerGetTeamFloatValue

GameSpy SDK

SBServerGetTeamFloatValue

Returns the value associated with the specified teams’ key. This value is returned as the appropriate type; Float, int or string.

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

Return Value

If the 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.
teamnum
[in] The integer index of the team.
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 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.

The SBServer object may be obtained during the SBCallback from ServerBrowserUpdate, or by calling ServerBrowserGetServer. An SBServer object will only exist for servers in the list. IP addresses removed from the server list will not have an SBServer object associated.

Team indexes are determined on a per-game basis. The only requirement is that they match the server’s reporting indexes.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
SBServerGetTeamFloatValueSBServerGetTeamFloatValueASBServerGetTeamFloatValueW

SBServerGetTeamFloatValueW and SBServerGetTeamFloatValueA are UNICODE and ANSI mapped versions of SBServerGetTeamFloatValue. The arguments of SBServerGetTeamFloatValueA are ANSI strings; those of SBServerGetTeamFloatValueW are wide-character strings.