Ruby exception occurred: undefined method `include?' for nil:NilClass

Hi,

What is wrong with my code? Why am I getting this error?

My Ruby code looks like that:

message_array = event.get("message").split("\n\n[", -1)
counter=0
message_array.each do | index | counter+=1
           if message_array[counter].include?("[1]")
              event.set("InterfaceName", message_array[counter])
          end
end

Thanks
Sharon.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.