@select doesn't work in Ruby module

[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif]Hello all, I need some help using the Ruby module in Flowbotics Studio 3.0.8[/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif][/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif]I am following this tutorial here to create a simple app[/font]youtube.com/watch?v=6-dEPTAyr_k
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif][/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif]The problem is that my if else statement does not seem to work even though I copied it exactly from the tutorial.[/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif][/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif]I’m using **@select **to take the true/false operator but the Ruby module just doesn’t seem to accept the output from the switch.[/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif][/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif]*I’ve checked the output from the[/font][font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif]switch and it is giving the correct output.[/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif]*I checked that both bitmaps display correctly when I display them separately.[/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif][/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif]As soon as I introduce the @select it fails.[/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif][/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif][/font][font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif]Attached are two screenshots ‘True’ and ‘False’ to illustrate the issue, also the code I’m using as a text file.[/font]

[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif][/font]
[font=Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif]Any help on this would be much appreciated, it is quite frustrating.[/font]
Ruby code.txt (221 Bytes)


Hi,

Thank you for your detailed post, pictures and attachments.

We tried the example and it worked quite well (see image below). The only difference we noticed is that your screenshots show your ruby module not having a name for the input #4 (select).

Of course, to refer to an input by name, you need to rename it first! :slight_smile:

Alternatively, you can always use the inputs directly, such as with:

if @ins[3] == true
We hope this helps.

Sincerely,

Thank you so much for the quick response, I just named the input and now it works perfectly! :smiley: