User Lua Script loaded BEFORE the Lua extension

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

control = controls:get(1)

All Im getting is:

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


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


doSomething()
213645 loadLuaModule: Lua extension file initialized: file=ctrlv2/p006.lua
2 Likes

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. :slight_smile:

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

1 Like

no problem at all. Just keep reports coming in :slight_smile: