SBServerGetTeamStringValue

GameSpy SDK

SBServerGetTeamStringValue

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

const gsi_char * SBServerGetTeamStringValue(
SBServer server,
int teamnum,
const gsi_char * key,
const gsi_char * sdefault );
RoutineRequired HeaderDistribution
SBServerGetTeamStringValue<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.
sdefault
[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
SBServerGetTeamStringValueSBServerGetTeamStringValueASBServerGetTeamStringValueW

SBServerGetTeamStringValueW and SBServerGetTeamStringValueA are UNICODE and ANSI mapped versions of SBServerGetTeamStringValue. The arguments of SBServerGetTeamStringValueA are ANSI strings; those of SBServerGetTeamStringValueW are wide-character strings.