Help with child unable to accept mistakes

My son has ASD diagnosd when he was 4-5y old and I had transferred to a small primary school where he received 1:1 tuition etc. and thrived. The transition to secondary was a nightmare. He couldn't cope from the get go. He's currently in the process of having further assessment for a pervasive developmental disorder. He is highly anxious, a perfectionist and very fearful of mistakes. Parenting requires a lot of intelligence really as he is very articulate but will not accept a mistake he has made. For example, if he's rushing about and slips, it's because there is a problem with the floor. If he's spilt something, it's a problem with the cup. Usually, he never starts a fight or argument at school, but when something happens he retaliates and uses foul language that results in him being complained about. He doesn't accept he's done wrong. He sees things as not being his fault, the other children used bad language but not accepting his use of bad language was ten times worse and something he doesn't even understand. He gets very anxious when something happens and I think he worries he will be blamed. My approach is to focus away from blame, and reassure him he's done nothing wrong. That works in de-escalating the situation. How do I cope with the parenting bit. So later, I will have a chat and say 'next time you run down the stairs to the kitchen, just make sure you're wearing your slippers in case the floor is slippery and you fall' or 'you know when other children call you names and use bad language, I don't think you should use bad language back at them because then they will complain about you, when you should complain to your teacher about them'. If I said to him that he has made a mistake and remember not to do it again, he will get very anxious and confrontational. What other things can I do or say to help in such situations.