# User Lua Script loaded BEFORE the Lua extension

**URL:** <https://forum.electra.one/t/user-lua-script-loaded-before-the-lua-extension/1540>\
**Category:** Bug reports\
**Created:** [June 5, 2022, 5:13am UTC](https://forum.electra.one/t/user-lua-script-loaded-before-the-lua-extension/1540 "2022-06-05T05:13:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaltar](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/kaltar/32/1051_2.png) [@Kaltar](https://forum.electra.one/u/Kaltar)\
**Post date:** [June 5, 2022, 5:13am UTC](https://forum.electra.one/t/user-lua-script-loaded-before-the-lua-extension/1540/1 "2022-06-05T05:13:54Z")

</div>

try a script with only one control and try the following LUA script:

```auto
control = controls:get(1)

```

All Im getting is:

```auto
1252477 loadLuaModule: error loading file: filename=ctrlv2/p006.lua, error=ctrlv2/p006.lua:8: calling 'get' on bad self (number expected, got table)

```

However, it is accepted after console loads the Lua extension

```auto

function doSomething()
    local control = controls.get(1)
end

doSomething()

```

```auto
213645 loadLuaModule: Lua extension file initialized: file=ctrlv2/p006.lua

```

---

<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:** [June 9, 2022, 4:34pm UTC](https://forum.electra.one/t/user-lua-script-loaded-before-the-lua-extension/1540/2 "2022-06-09T16:34:55Z")

</div>

`controls` is not a Lua object, therefore the `:` cannot be used to invoke the `get` method. You need to use the `.` notation. That is what you actually did in the second example. 🙂

---

<div class="post-metadata">

**Author:** ![Kaltar](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/kaltar/32/1051_2.png) [@Kaltar](https://forum.electra.one/u/Kaltar)\
**Post date:** [June 9, 2022, 9:59pm UTC](https://forum.electra.one/t/user-lua-script-loaded-before-the-lua-extension/1540/3 "2022-06-09T21:59:59Z")

</div>

Oh My! I do apologize for the newbie mistake! I promise will review those details before reporting it.

---

<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:** [June 10, 2022, 3:48am UTC](https://forum.electra.one/t/user-lua-script-loaded-before-the-lua-extension/1540/4 "2022-06-10T03:48:49Z")

</div>

no problem at all. Just keep reports coming in 🙂
