# ParameterDescription Maximum Incorrect

**URL:** <https://qa.fmod.com/t/parameterdescription-maximum-incorrect/15560>\
**Category:** FMOD Engine\
**Created:** [March 19, 2020, 11:47pm UTC](https://qa.fmod.com/t/parameterdescription-maximum-incorrect/15560 "2020-03-19T23:47:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kleptine](https://avatars.discourse-cdn.com/v4/letter/k/ccd318/32.png) [@kleptine](https://qa.fmod.com/u/kleptine)\
**Post date:** [March 19, 2020, 11:47pm UTC](https://qa.fmod.com/t/parameterdescription-maximum-incorrect/15560/1 "2020-03-19T23:47:25Z")

</div>

When called on a Discrete Parameter such as one like:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/0/0ede23d854439c45fe5a151a87e6efb4a61f58ad.png)

the api call PARAMETER\_DESCRIPTION::maximum returns a value one greater than the actual maximum. In this case 3. This is quite annoying, as you have to know the type of the parameter to know whether to subtract 1 or not.

Easily reproduced. Latest version.

---

<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:** [March 25, 2020, 4:27am UTC](https://qa.fmod.com/t/parameterdescription-maximum-incorrect/15560/2 "2020-03-25T04:27:18Z")

</div>

Your discrete parameter actually has three values it could be set to (0,1,2), whereas a continuous parameter with the same range will have a maximum of 2 because that is the highest value it can be set to.

---

<div class="post-metadata">

**Author:** ![kleptine](https://avatars.discourse-cdn.com/v4/letter/k/ccd318/32.png) [@kleptine](https://qa.fmod.com/u/kleptine)\
**Post date:** [March 25, 2020, 1:21pm UTC](https://qa.fmod.com/t/parameterdescription-maximum-incorrect/15560/3 "2020-03-25T13:21:49Z")

</div>

I understand that, but it makes no sense from an API point of view.

If I want to loop through all the values of a generic parameter, I’d need to know whether the Event was Discrete (maximum is _exclusive_) or Continuous (maximum is _inclusive_). Is there some way I can check this with the current API?

It’s also just a really confusing API – the maximum of the discrete parameter is 2. The “length” is 3, sure, but that’s a totally different thing.

---

<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:** [March 26, 2020, 3:46am UTC](https://qa.fmod.com/t/parameterdescription-maximum-incorrect/15560/4 "2020-03-26T03:46:29Z")

</div>

Ah yes, sorry, I am understanding you now. This can be confusing as there is no way to know if the parameter should be inclusive or exclusive of the maximum. I have added a task to investigate the best way to change this in an upcoming release.
