Report Bugs Here

Moderator: Mmiscool

User avatar
By Luc Volders
#63892 Hi there,

For testing purposes for a specific project i need multiple sliders.
So I thought to be clever and made an array with 7 elements.
Next I put some sliders on the screen and used the array entries as slider value.

Not working.

Code: Select allslider testval(1), 0, 255


This snippet does not put the slider value into the array.

Look at the following code:

Code: Select alldim testval(6)

for x = 0 to 5
testval(x) = 0
next x

slider testval(1), 0, 255
wprint "<br>"
wprint "<br>"

slider testval(2), 0, 255
wprint "<br>"
wprint "<br>"

button "Change", [change]

wait

[change]
for x=0 to 5
wprint testval(x)
wprint "<br>"
next x
wait


If I change the variable in a normal variable like test1 and test2 the code works flawlessly.

So is the bug in the array function or in the slider function......

I can bypass this by using individual variables for the sliders. However If I need many sliders I am running against the varaiable limit of ESP-Basic, so using sliders with an array would be nice. Besides that I would like about 12 sliders (maybe more) and an array would make programming that a lot easier.

Luc
User avatar
By Mmiscool
#63920 All of the gui object are limited to using only the normal variables. Not arrays.