i am a amatour coder and i am new on ruby. i codes twitch bot for my hobby. i wrote a spam script. but i want to this words i want to a loop. i did that that just taking !sea u can take me another option or fix that code. btw that code work without loop (i tried firstly on for loop its didnt works)

array = ['!prime', '!sea']
array1 = ['30s', '20s' ]
loop do 
  x = 0
  scheduler.interval array1[x] do 
    write_to_chat(array[x])
    break 
  end
  x += 1 
  if x == 1 
    break
  end 
end

0 Answers