Put your reams of code to one side and write a short program for yourself concentrating on the bool aspect and then, when you have that right, scale up to your main job.
Also: If you nest if's then technically you can do it but I try to program without ever using elseif as it usually ends up as a nightmare. Especially when you don't have pseudocode plan, which most students don't.