# Updated FMOD API C++ Functions Help

**URL:** <https://qa.fmod.com/t/updated-fmod-api-c-functions-help/22406>\
**Category:** FMOD Engine\
**Tags:** cpp\
**Created:** [December 13, 2024, 9:41pm UTC](https://qa.fmod.com/t/updated-fmod-api-c-functions-help/22406 "2024-12-13T21:41:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![branskylar](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/branskylar/32/4863_2.png) [@branskylar](https://qa.fmod.com/u/branskylar)\
**Post date:** [December 13, 2024, 9:41pm UTC](https://qa.fmod.com/t/updated-fmod-api-c-functions-help/22406/1 "2024-12-13T21:41:53Z")

</div>

Hi team,

I’m working on building a FMOD API framework for C++ and I found a helpful tutorial to get started, but it appears in recent FMOD updates, there have been certain functions removed/changed. For reference, the tutorial was from 2016 and I’m using FMOD 2.02.25.

I attempted to fix using the FMOD API release notes, but was unsuccessful. Could someone with a more seasoned eye help me debug/explain what I did wrong in these two parameter-related functions please?

```auto
void CAudioEngine::GetEventParameter(const string& strEventName, const string& strParameterName, float* parameter) {
    auto tFoundIt = sgpImplementation->mEvents.find(strEventName);
    if (tFoundIt == sgpImplementation->mEvents.end())
        return;
    FMOD::Studio::EventInstance* pParameter = NULL;
    CAudioEngine::ErrorCheck(tFoundIt->second->getParameterByName(strParameterName.c_str(), &pParameter));
    CAudioEngine::ErrorCheck(pParameter->getParameterByName(parameter));
}

void CAudioEngine::SetEventParameter(const string& strEventName, const string& strParameterName, float fValue) {
    auto tFoundIt = sgpImplementation->mEvents.find(strEventName);
    if (tFoundIt == sgpImplementation->mEvents.end())
        return;
    FMOD::Studio::EventInstance* pParameter = NULL;
    CAudioEngine::ErrorCheck(tFoundIt->second->getParameterByName(strParameterName.c_str(), &pParameter));
    CAudioEngine::ErrorCheck(pParameter->setParameterByName(fValue));
}

```

Attaching error list as well.

 ![Screenshot 2024-12-13 163946](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/1/1a9ed61666713276184907d4c94b2da97cdc16f6.png)

Thank you!  
Brandon

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [December 19, 2024, 1:31am UTC](https://qa.fmod.com/t/updated-fmod-api-c-functions-help/22406/2 "2024-12-19T01:31:41Z")

</div>

> [@branskylar](#):
>
> ```auto
> FMOD::Studio::EventInstance* pParameter = NULL;
> CAudioEngine::ErrorCheck(tFoundIt->second->getParameterByName(strParameterName.c_str(), &pParameter));
> CAudioEngine::ErrorCheck(pParameter->getParameterByName(parameter));
> 
> ```

[getParameterByName](https://www.fmod.com/docs/2.02/api/studio-api-eventinstance.html#studio_eventinstance_getparameterbyname) needs to be called on a FMOD Event, with the second parameter being a float reference as the returned parameters value.
