Bolean are True or False,
While condition ONLY accepts Bolean as an argument,
you are not comparing the var B to anything, thus While Loop see it as an integer not a Bolean.
e.g While(True){
#run this code
}
//yours is:
While(decrementThisnumber){
#run this code.
}