IGameStatistics::SetStatistic Method

Sets the name and value of the indexed statistic.

Syntax

virtual HRESULT SetStatistic(
         WORD categoryIndex,
         WORD statIndex,
         LPCWSTR name,
         LPCWSTR value
)

Parameters

  • categoryIndex
    [in] The category to set.
  • statIndex
    [in] The statistic to set.
  • name
    [in, optional] The name of the statistic to set (can be NULL).
  • value
    [in, optional] The value of the statistic to set (can be NULL).

Return Value

Returns S_OK if the name and value were successfully set. Returns E_INVALIDARG if categoryIndex or statIndex are outside the maximum values.

Remarks

If either name or value are set to NULL, the string will be set to empty.

Requirements

Header: Declared in gameux.h.

See Also

IGameStatistics::GetStatistic
IGameStatistics