From: "Jesús Gabriel y Galán" Date: 2010-10-08T16:12:40+09:00 Subject: Re: urgent help required# wrote: > prompts5 = ["Span type"] > defaults5 = ["1. Simply supported"] > @t_slab = ["1. Simply supported |2. Interior span |3. End span |4. > Cantilever"] > list5 = [@t_slab] > title5="Please select the type of the span" > @input_tslab = inputbox prompts5, defaults5, list5,title5 > > kay_array = [1.0, 1.5, 1.3, 0.4] > @ka = kay_array[(@input_tslab).to_i-1] > > > If "3. End span" is selected by in the UI, following error is > displayed.. > > Error: # "]:Array> Without knowing what inputbox does, it seems from the error message that it's returning an Array. If you are sure that what you are after is in the first position of the array, you could do: @ka = kay_array[@input_tslab.first.to_i-1] Jesus.