sorry i forgot about the } it was my 1st script making and i dont know how to use if ($chan == $null) { them yet