/ SDKs / Unreal
SDKs
Chat SDKs Unreal v3
Chat SDKs Unreal
Chat SDKs
Unreal
Version 3

Increase a channel metacounter

Copy link

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;
    }
});