Whenever I'm writing, I use this style:
•"I don't see why I have to put up with this nonsense." I muttered.
However, I see this type of writing in books:
•"This room is full of idiots," he muttered.
Is the style I use okay, or do I have to change it to the one I see in books?