# parameterMap.onChange() changed?

**URL:** <https://forum.electra.one/t/parametermap-onchange-changed/1979>\
**Category:** Developers\
**Created:** [March 30, 2023, 8:25pm UTC](https://forum.electra.one/t/parametermap-onchange-changed/1979 "2023-03-30T20:25:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldgearguy](https://avatars.discourse-cdn.com/v4/letter/o/f4b2a3/32.png) [@oldgearguy](https://forum.electra.one/u/oldgearguy)\
**Post date:** [March 30, 2023, 8:25pm UTC](https://forum.electra.one/t/parametermap-onchange-changed/1979/1 "2023-03-30T20:25:20Z")

</div>

When I tried to use parameterMap.onChange() like the example:

```auto
function parameterMap.onChange(valueObjects, origin, midiValue)
    print (string.format ("a new midiValue %d from origin %d",
        midiValue, origin))

        for i, valueObject in ipairs (valueObjects) do
            **local control = valueObject:getControl ()**
            print (string.format ("affects control value %s.%s",
                control:getName (), valueObject:getId ()))
        end
end

```

and I turn a control, I get this error message:

```auto
16:06:20.177 lua: a new midiValue 463 from origin 0
16:06:20.195 error running function 'onChange': ctrlv2/p000.lua:1313: attempt to index a userdata value (local 'valueObject')

```

(the line in question is the one with the \*\* \*\*)

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [April 1, 2023, 4:28pm UTC](https://forum.electra.one/t/parametermap-onchange-changed/1979/2 "2023-04-01T16:28:46Z")

</div>

Thanks for reporting! The function was affected by the 2.x → 3.x firmware upgrade. It should work just fine now.

---

<div class="post-metadata">

**Author:** ![urbanspaceman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/urbanspaceman/32/206_2.png) [@urbanspaceman](https://forum.electra.one/u/urbanspaceman)\
**Post date:** [April 8, 2023, 3:14pm UTC](https://forum.electra.one/t/parametermap-onchange-changed/1979/3 "2023-04-08T15:14:12Z")

</div>

I’m still getting the same thing in Firmware 3.1

```auto
attempt to index a userdata value (local 'valueObject')

```

---

<div class="post-metadata">

**Author:** ![oldgearguy](https://avatars.discourse-cdn.com/v4/letter/o/f4b2a3/32.png) [@oldgearguy](https://forum.electra.one/u/oldgearguy)\
**Post date:** [April 8, 2023, 3:58pm UTC](https://forum.electra.one/t/parametermap-onchange-changed/1979/4 "2023-04-08T15:58:30Z")

</div>

3.1.7 os is definitely fine, if you want to deal with using the beta (which has been very stable for me so far)

---

<div class="post-metadata">

**Author:** ![urbanspaceman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/urbanspaceman/32/206_2.png) [@urbanspaceman](https://forum.electra.one/u/urbanspaceman)\
**Post date:** [April 8, 2023, 4:20pm UTC](https://forum.electra.one/t/parametermap-onchange-changed/1979/5 "2023-04-08T16:20:10Z")

</div>

Where are the betas uploaded to? I can’t find anything past 3.1

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [April 9, 2023, 6:12am UTC](https://forum.electra.one/t/parametermap-onchange-changed/1979/6 "2023-04-09T06:12:10Z")

</div>

@urbanspaceman, go to [https://beta.electra.one/](https://beta.electra.one/). Use your regular production credentials to log in. The website will offer an update to the latest beta version. Note, only only the firmware is beta, the website itself is ahead of the app.electra.one.
