I didn't intend my post to come across as arrogant, so I'm sorry you interpreted it that way.

Once you read the help file for /help on QUIT there are a few hints that $chan won't exist:

1) The event description - "The on QUIT event triggers when a user quits IRC while on the same channel as you."
2) The event format - "on level:QUIT:" - there is no target parameter here like there is for on join/part/action/notice/etc
3) The script example - it doesn't use $chan but instead uses /ame, which if you look up in the help file sends an action message to all channels.

The reason I suggested that it was spoon feeding scripters to provide the $comchan example is because the quit event is channel-less. It is therefore not necessary for Khaled to explain how to get the channels you share with that particular nickname. It is a special type of script that would require the channels, such as a theme. It's not the developer's job to give specialised examples.

I'm not sure exactly what you expect the help file to be, but what steps did you take to try to find $chan(N) ? I've been a member of this forum since around 2003/04 (went by different usernames back then) and I can say that $chan(N) has been used hundreds of times on this board. It's not some hidden and ultra-complicated identifier that is rarely used :P

My point is that the documentation already contains the information you need, you're just not looking for it. To get more elaborate examples you really need to join a scripting forum such as this one, or go and lurk in a help channel to see questions asked and answered.

You can also search on websites like mircscripts.org to see if a particular script you're trying to do has already been done and, if so, look at how it was written.

I'm not saying the help file can't use improvements, it's just that I don't know a language on the planet where you only need the help file to learn it properly. Examples and discussions with other like minded coders always helps.