Trouble setting up flag ( getopt) for my script

do
    case $option in
        d ) CHEC=true;;
        # more option processing can go here
        \? ) echo "Unknown option: -$OPTARG"
        :  ) echo "Missing option argument for -$OPTARG";;
        *  ) echo "Unimplimented option: -$OPTARG";;
    esac
done
shift $(($OPTIND - 1))

Summary says, "Trouble setting up". What have you tried and where are you stuck?
If you're looking for tutorials on getopts, there're plenty of posts available right in this forum.

added to my question