If you can identify 20 sections which are identical except for the line number, you can make that an alias which you pass the line number to it:

var %line 1

while (%line isnum 1-20) {
line_handling_alias %line
inc %line
}

alias line_handling_alias {
var %bet ($readini,bets.ini,n,section,bettor $+ $1)
etc
}

You can also made a pair of aliases for reading and writing each file, so that each .ini only needs to be mentioned twice in the entire script.