I have a problem that when I play a note on the e string (the tiniest one) on the 17th to 20th fret, I noticed that the same notes were repeated and starting in the 21st fret, the notes were fine again. I tried messing up with my electric guitar's action and intonation and something went wrong and I cannot bring it back when it was before. How do I fix this?
The top string is a little too low, so as you get to the dusty end, it's catching on the fretwire of fret 20. If that's the only problem, raising the saddle on the the string should be enough to get it sounding past fret 17.
There's a faint possibility that the fretwire itself is just too high - check using a ruler - not to measure, but as a straight edge. If it's not in line, a little tap should put it back in its place.