Here is the error I get in recon:
Code: Select all
Error when creating device: Error compiling <redacted>/motherboard_def.lua. Error message: Error at line 21: '}' expected (to close '{' at line 19) near '=' (LUA_ERRSYNTAX ---)
Code: Select all
back = jbox.panel{
...
widgets = {
...
jbox.up_down_button{
graphics = { node = "TriggerNoteUpDownButton" },
value = "/custom_properties/triggerNote"
},
jbox.value_display{
graphics = { -- required
node = "TriggerNoteOutValueDisplay",
},
value = "/custom_properties/triggerNote",
text_color = { 38, 152, 162 },
text_style = "LCD font",
}
}
I have in my motherboard_ref.lua file:
Code: Select all
custom_properties = jbox.property_set{
document_owner = {
properties = {
triggerNote = jbox.number{
ui_name = jbox.ui_text( "text_triggerNoteOut" ),
default = 0,
steps = 2,
ui_type = jbox.ui_linear( {
min = 0,
max = 1,
-- units = {{ decimals = 0 }} -- THIS WORKS FINE BUT DOESN'T USE MY CUSTOM TEXT
units = {
{
decimals = 0,
min-value = 0,
unit = {
template = jbox.ui_text( "text_C0" ), // THIS IS "C0" IN texts.lua
base = 1
}
},
{
decimals = 0,
min-value = 1,
unit = {
template = jbox.ui_text( "text_C#0" ), -- THIS IS "C#0" IN texts.lua
base = 1
}
}
}
} ),
persistance = "song"
}
}
},
...