Building has always been hell for many people. I would like to know where you are writing from but its no big deal. Let me just speak from what i know. It is a tricky situation when you want to build, and you need all the certifications first before you can start. The first thing you need to do is find out all the relevant information before you start your project. Walk around, ask questions from people who have done that kind of work before and how they went about it. That way you will habe some insights on what you need to do, and where you need to start. Anyway now that it's done and your having issues with the inspector, explain to him how you obtained the permit, if he says it was not acquired in the right manner, you need to think fast and tell him how you were not aware that the permit was not right. Ask him to guide you through the process and direct you accordingly without having to bring the roof down. You should be able to come to some kind of agreement, and you should also be able to compromise something to have things done right, not Bribing. There has to be a way.