# Error with Example Code for Programmer Sounds

**URL:** <https://qa.fmod.com/t/error-with-example-code-for-programmer-sounds/15671>\
**Category:** Unity\
**Created:** [April 20, 2020, 10:26pm UTC](https://qa.fmod.com/t/error-with-example-code-for-programmer-sounds/15671 "2020-04-20T22:26:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vguedes](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@vguedes](https://qa.fmod.com/u/vguedes)\
**Post date:** [April 20, 2020, 10:26pm UTC](https://qa.fmod.com/t/error-with-example-code-for-programmer-sounds/15671/1 "2020-04-20T22:26:24Z")

</div>

I’m trying to get a Programmer Instrument to play some dialogue, and so I used the Programmer Sound example provided in the documentation. The problem is that it gives the error mentioned in the title even without any modifications, just one to one that code.

The line in question that is giving problems is the following:  
‘dialogueCallback = new FMOD.Studio.EVENT\_CALLBACK(DialogueEventCallback);’

The error in question is the following:  
No overload for ‘DialogueEventCallback’ matches delegate ‘EVENT\_CALLBACK’

Already tried to reimport everything, different Unity versions and nothing has worked so far.

Unity version 2019.3.10f1  
FMOD version 2.01

Thanks for the help in advance.

---

<div class="post-metadata">

**Author:** ![vguedes](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@vguedes](https://qa.fmod.com/u/vguedes)\
**Post date:** [April 22, 2020, 8:04am UTC](https://qa.fmod.com/t/error-with-example-code-for-programmer-sounds/15671/2 "2020-04-22T08:04:17Z")

</div>

Still having the above issue, and the same happened when I tried the Timeline Callback code too. Same error, also connected with ‘.EVENT\_CALLBACK’ line of code.

Tried to re-import the project, tried different versions of Unity, tried to find other alternatives for the Callback and nothing has worked out.

Any thoughts or suggestions?

Thank you!

---

<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:** [April 29, 2020, 5:30am UTC](https://qa.fmod.com/t/error-with-example-code-for-programmer-sounds/15671/3 "2020-04-29T05:30:55Z")

</div>

Are you using the example from the 2.1 documentation? There is difference with the docs from 2.0 so that could be a cause. Both of those examples work when I test them.

---

<div class="post-metadata">

**Author:** ![vguedes](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@vguedes](https://qa.fmod.com/u/vguedes)\
**Post date:** [April 29, 2020, 8:05am UTC](https://qa.fmod.com/t/error-with-example-code-for-programmer-sounds/15671/4 "2020-04-29T08:05:21Z")

</div>

Yes, I am using that documentation and using the respective integration.

I tried both just in case, and get the same error with all of them.

---

<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:** [May 3, 2020, 11:56pm UTC](https://qa.fmod.com/t/error-with-example-code-for-programmer-sounds/15671/5 "2020-05-03T23:56:19Z")

</div>

The only way I can reproduce this is by using the example code from 2.0 with the 2.01 integration. The `FMOD.Studio.EVENT_CALLBACK` definition in 2.01 changed the `EventInstance` parameter to `IntPtr`.

---

<div class="post-metadata">

**Author:** ![vguedes](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@vguedes](https://qa.fmod.com/u/vguedes)\
**Post date:** [May 4, 2020, 8:30am UTC](https://qa.fmod.com/t/error-with-example-code-for-programmer-sounds/15671/6 "2020-05-04T08:30:32Z")

</div>

Thanks Cameron!

That indeed seemed to solve it. I did copy the example from 2.01 and got an error, then I might’ve switched with the other code for testing and that was the last one in Unity session.

Now it seems to be solved, need to further test it though. Thanks again!
