Chat / Unreal
Current version: v3
Chat Unreal v3
Chat Unreal
Chat
Unreal
Home
/
Chat
/
Unreal
/
Channels

Decrease a channel metacounter

You can decrease values in a channel metacounter by passing a Map of keys to decrease as an argument to a parameter in the DecreaseMetaCounters() method. The values of corresponding keys in the metacounter will be decremented by the number you’ve specified.

std::map<std::wstring, int64_t> metaCounters;
metaCounters[L"key1"] = 3; // Decrease by 3.
metaCounters[L"key2"] = 4; // Decrease by 4.

channel->DecreaseMetaCounters(metaCounters, [](const std::map<std::wstring, int64_t>& metaCounters, SBDError* error) {
    if (error != nullptr) {
        // Handle error.
        return;
    }
});