If you need only average rating for song:
[Finish me - Trance]
[Dota - Basshunter]
So you will need to check if new $nick is already in "nicks" and if not - add $nick to "nicks" line and his rate to "rates". To get average use loop from 1 up to $numtok(your.ini,songname,rates).