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

Decrease a channel metacounter

Copy link

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.