Code:
on !*:join:#channel: { 
$+(.timeridle.,$chan) 0 30 scanidle $chan 
} 
alias scanidle { 
var %x = 1 
while ( %x <= $nick($1,0,v) ) { 
if ( $nick($1,%x,v).idle >= 900) && ( $nick($1,%x,v) != $me ) { 
kick $1 $nick($1,%x,v) Anti-idle-kick 
} 
inc %x 
} 
} 
  


You have an extra : in your on join & on part events. I removed them in the above code. The 900 is the amount of time the person has to be idle in the room before being kicked (equal to 15 minutes). No need to set a variable for that, since it can be hard coded just as easily. Since you want the timer to check idle times every 30 seconds (according to the code), you don't want to shut off the timer when someone parts the room. So I removed the ON PART event

I did notice that your code only checks the idle time of those that are voiced. In that regard, I altered the while line so that it only references those in the room that are voiced. Might not make any difference, but might speed things up if you have a lot in the room that are ops, hops, or regulars .