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

Increase a channel metacounter

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

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

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