I tried this script:
Code: Select all
switch_id = si_variable_create("my_var", "INT4]", {1, 3, 5, 7})
si_variable_write(switch_id, {data}, 2)
How can I solve the problem?
Marc
Code: Select all
switch_id = si_variable_create("my_var", "INT4]", {1, 3, 5, 7})
si_variable_write(switch_id, {data}, 2)
Hi,
you mean only [3] is changed (by convention) ....Keith Baxter wrote: ↑Fri Sep 30, 2022 4:06 pmHi,
It is only the off set write that does not work.
That does not stop writing an array.
On a branch of that...
I had asked some time ago for a null write to a array index.
Example.
my_array = {"red"',"red"',"red"',"red"'}
I do not want to write to a some indexes, keeping their values.
In other words I want to write
my_array = {null,null, “yellow”,null}
So only [2] is changed.
my_array = {"red"',"red"',"yellow"',"red"'}
Keith
No 2 because arrays start at 0 in most coding except lua.jph wrote: ↑Fri Sep 30, 2022 4:28 pmyou mean only [3] is changed (by convention) ....Keith Baxter wrote: ↑Fri Sep 30, 2022 4:06 pmHi,
It is only the off set write that does not work.
That does not stop writing an array.
On a branch of that...
I had asked some time ago for a null write to a array index.
Example.
my_array = {"red"',"red"',"red"',"red"'}
I do not want to write to a some indexes, keeping their values.
In other words I want to write
my_array = {null,null, “yellow”,null}
So only [2] is changed.
my_array = {"red"',"red"',"yellow"',"red"'}
Keith