While this code works properly for me, the person I wrote it for states that it's not writing to the ini file.
I've run out of ideas as to why it might not be. I don't know if this is something that can be handled via the script or not, but in case it can, I have included the script here
Code:
alias askq { 
  if ($1) { 
    var %a = $($+(%,questioncounter,$1),2) 
    if $read("c:\mircstats\stats questions.txt",%a) { 
      msg $1 $ifmatch 
      timerask $+ $1 0 30 askq $1 
    } 
    else {
      .msg $1 Thanks for taking part
      dontask $1
    } 
  } 
} 
alias dontask { 
  if ($1) { 
    $+(.timer,ask,$1) off 
    unset  $+(%,questioncounter,$1) 
    unset $+(%,chan,$1)
  } 
  else { 
    .timerask* off 
    unset  %questioncounter* 
  } 
} 
on *:TEXT:*:*: { 
  if (!stop* iswm $1) { dontask $nick } 
  elseif ($target ischan) { 
    if (!addnick* iswm $1) { 
      .msg $nick Please answer the questions in this pm window 
      .msg $nick If you don't have an answer or don't want to answer a question, just enter a dummy response..NOTE: Hitting Enter/Return alone will not work. 
      .msg $nick I regret that this is necessary, however, I was unable to allow for a null (empty) response. 
      set $+(%,chan,$nick) $chan 
      set $+(%,questioncounter,$nick)  1 
      askq $nick 
    } 
  } 
  else {
    if $($+(%,chan,$nick),2) {
      .writeini c:\mircstats\Stats.ini $nick $($+(%,questioncounter,$nick),2) $1-
      inc $+(%,questioncounter,$nick)
      askq $nick
    } 
  }
} 
on *:EXIT: { dontask } 
on *:PART:#: { 
  if $chan == $($+(%,chan,$nick),2) && $timer(ask $+ $nick) { dontask $nick } 
} 
on *:QUIT: { 
  if ($timer(ask $+ $nick)) { dontask $nick } 
} 
on *:nick:{ 
  if ($timer(ask $+ $nick)) { dontask $nick | askq $newnick } 
}