Code:
 
alias idlers {  
  var %idlenicks = $snicks
  var %i = 1  
  var %nicktoken = $gettok(%idlenicks,0,44)
  while (%i <= %nicktoken) {  
    var %checknick = $gettok(%idlenicks,%i,44)
    notice %checknick Your Idle Time in $active $+ : $duration($nick($active,%checknick).idle)  
    inc %i 
 }
}
 


the last brackets need moving like here, otherwise you will receive the error
* /while: close bracket not found

cheers