ipairs() is only for indexed tables (arrays), and will only work if there are no gaps in the table.
If your table uses keys in place of indices, or there are gaps in your table, use pairs() as Fizzlemizz suggested.
http://lua-users.org/wiki/TablesTutorial
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff,
The Tao of Pooh