In C# you cannot cast from/to bool. The device 'bricked' with 'WHEN incommrange == 1 THEN { print STUFF}.'.
Fixed the keywording on CheckCommRange().