Oh, there’s one more thing I’d like to mention, it’s unrelated to the previous issue
If I make a typo in a script, for example writing screnn.move(20,30) instead of writing screen.move(20,30) this immediately breaks everything. I mean that it goes back to the main screen displaying the name of the script but the buttons and encoders become unresponsive.
Even if I fix the mistake and run the script again in Maiden, the only way of getting back to normal is to reboot the Raspberry Pi.
I’m often making a small typing mistake (or worse) when writing scripts in Maiden and this generally leads to an «attempt to index a nil value », but i think it used to go back to normal immediately after fixing the typo and without requiring a reboot.
I’m not sure yet but I think it happens only if the mistake is done within the redraw() function.
Has anybody noticed that too or does it happen only with my setup ?
If somebody wants to test on Fates maybe…
Here’s a very basic script containing a typo on line 24
-- scriptname: short script description
-- v1.0.0 @author
-- llllllll.co/t/22222
function init()
-- initialization
redraw()
end
function key(n,z)
-- key actions: n = number, z = state
end
function enc(n,d)
-- encoder actions: n = number, d = delta
end
function redraw()
-- screen redraw
screen.clear()
screen.move(20,30)
scree.text("hello")
screen.update()
end
function cleanup()
-- deinitialization
end
and this is the output of Matron
norns.script.load(“code/untitled.lua”)
script load: /home/we/dust/code/untitled.lua
cleanup
script clear
pset >> write: /home/we/dust/data/system.pset
script run
Engine.register_commands; count: 0
___ engine commands ___
___ polls ___
amp_in_l
amp_in_r
amp_out_l
amp_out_r
cpu_avg
cpu_peak
pitch_in_l
pitch_in_r
script init
lua:
/home/we/dust/code/untitled.lua:24: attempt to index a nil value (global ‘scree’)
stack traceback:
/home/we/dust/code/untitled.lua:24: in function ‘redraw’
/home/we/norns/lua/core/menu.lua:193: in field ‘set_mode’
/home/we/norns/lua/core/menu.lua:129: in field ‘init_done’
/home/we/norns/lua/core/engine.lua:90: in function </home/we/norns/lua/core/engine.lua:88>