He advised me/ to do as he did/ but I did not pay any attention/ to his advice. /(No error)
The answer is no error , but I think the sentence should say “to do as he had done”. Why is “as he did” acceptable?
This is a case of tense change due to indirect speech.
Suppose I am about to show you how to do something. I say “Do as I do” and then show you the technique. Later on you want to tell someone else what I said. Now you have two choices: Direct Speech or Indirect Speech.
For Direct Speech, you simply repeat what I actually said, as a quote:
“He said ‘Do as I do.'”
For Indirect Speech, though, you do not just repeat what I actually said, so you don’t have to use the exact same words, you don’t have to use quotes, you generally use a ‘reporting’ verb such as tell or ask (or advise), and (most importantly here) you shift the verb tense that you use back in time, from present to simple past, to reflect that the event happened in the past:
“He told me to do as he did.”
Because I used the present in my original statement, you have to use the simple past in your indirect-speech version of what I said.
Of course, I might actually say “Watch this:”, then show you the technique, and then say “Do as I did.” This time I used the simple past tense in my statement instead of present tense. If you want to use Indirect Speech to tell someone else what I said, you still have to shift the tense, but because my statement is already in past tense, you go to the past perfect:
“He told me to do as he had done.”
So, both “as he did” and “as he had done” can be correct depending on what was actually said originally.