First of all instead of using null
s you would be better using an empty collection. Next use :+= so the result of :+ would not be thrown away — :+ produces a new collection as the result instead of modifying the existing one. The final code would look like
var all_info: Seq[(String, Int, Int)] = Seq.empty
all_info :+= (name, id, count)
As you can see, now you don't need if
s and code should work fine.