06.04.2014, 16:58
All those checks are being used before sscanf assigns a value to id, so really you're just comparing with the value 0. Place the sscanf function at the top right after declaring your variables, then do your checks afterwards.